mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat(UI): make it possible to select text of the received friend request
This commit is contained in:
parent
9d1275b396
commit
0660695873
|
@ -308,10 +308,14 @@ void AddFriendForm::addFriendRequestWidget(const QString &friendAddress, const Q
|
|||
friendLayout->addLayout(horLayout);
|
||||
|
||||
CroppingLabel* friendLabel = new CroppingLabel(friendWidget);
|
||||
friendLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
friendLabel->setText("<b>" + friendAddress + "</b>");
|
||||
horLayout->addWidget(friendLabel);
|
||||
|
||||
QLabel* messageLabel = new QLabel(message);
|
||||
// allow to select text, but treat links as plaintext to prevent phishing
|
||||
messageLabel->setTextInteractionFlags(Qt::TextSelectableByMouse |
|
||||
Qt::TextSelectableByKeyboard);
|
||||
messageLabel->setTextFormat(Qt::PlainText);
|
||||
messageLabel->setWordWrap(true);
|
||||
horLayout->addWidget(messageLabel, 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user