|
|
@ -69,7 +69,6 @@ TextLabel::TextLabel(const QString &text, QWidget *parent) |
|
|
|
&TextLabel::adjustHeight); |
|
|
|
&TextLabel::adjustHeight); |
|
|
|
document()->setDocumentMargin(0); |
|
|
|
document()->setDocumentMargin(0); |
|
|
|
|
|
|
|
|
|
|
|
setFocusPolicy(Qt::NoFocus); |
|
|
|
|
|
|
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); |
|
|
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); |
|
|
|
setFixedHeight(0); |
|
|
|
setFixedHeight(0); |
|
|
|
|
|
|
|
|
|
|
@ -94,6 +93,16 @@ TextLabel::TextLabel(const QString &text, QWidget *parent) |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
TextLabel::focusOutEvent(QFocusEvent *e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QTextBrowser::focusOutEvent(e); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTextCursor cursor = textCursor(); |
|
|
|
|
|
|
|
cursor.clearSelection(); |
|
|
|
|
|
|
|
setTextCursor(cursor); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
TextLabel::mousePressEvent(QMouseEvent *e) |
|
|
|
TextLabel::mousePressEvent(QMouseEvent *e) |
|
|
|
{ |
|
|
|
{ |
|
|
|