DCO Remediation Commit for cullvox <cullvox@outlook.com>
I, cullvox <cullvox@outlook.com>, hereby add my Signed-off-by to this commit: c81689d39322d5ea5c7ed0073d73e4d8d2446b33 Signed-off-by: cullvox <cullvox@outlook.com>
This commit is contained in:
parent
07645984b5
commit
4053229544
@ -36,8 +36,9 @@
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <QToolTip>
|
||||
#include <QTextCursor>
|
||||
#include <QTextDocument>
|
||||
#include <QToolTip>
|
||||
|
||||
#include "InfoFrame.h"
|
||||
#include "ui_InfoFrame.h"
|
||||
@ -276,14 +277,12 @@ void InfoFrame::setDescription(QString text)
|
||||
QString labeltext;
|
||||
labeltext.reserve(300);
|
||||
|
||||
|
||||
// elide rich text by getting characters without formatting
|
||||
const int maxCharacterElide = 290;
|
||||
QTextDocument doc;
|
||||
doc.setHtml(text);
|
||||
|
||||
if (doc.characterCount() > maxCharacterElide) {
|
||||
|
||||
ui->descriptionLabel->setOpenExternalLinks(false);
|
||||
ui->descriptionLabel->setTextFormat(Qt::TextFormat::RichText); // This allows injecting HTML here.
|
||||
m_description = text;
|
||||
|
Loading…
x
Reference in New Issue
Block a user