1
0
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:
Zetok Zalbavar 2016-12-09 02:54:37 +00:00
parent 9d1275b396
commit 0660695873
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -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);