fix a regression with the link fix: we only want to go into text browser mode when text is selectable
svn path=/branches/KDE/4.4/kdelibs/; revision=1096903
This commit is contained in:
parent
eedcf88713
commit
73d1f4a7c9
@ -116,7 +116,6 @@ Label::Label(QGraphicsWidget *parent)
|
||||
QLabel *native = new QLabel;
|
||||
//disabled for now: triggers Qt bug 7254
|
||||
//native->setWindowFlags(native->windowFlags()|Qt::BypassGraphicsProxyWidget);
|
||||
native->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
d->textSelectable = false;
|
||||
connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
|
||||
connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
|
||||
@ -191,6 +190,12 @@ bool Label::hasScaledContents() const
|
||||
|
||||
void Label::setTextSelectable(bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
native->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
} else {
|
||||
native->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
|
||||
}
|
||||
|
||||
d->textSelectable = enable;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user