Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.1, 4.5.2, 4.5.3, 4.6.0
-
None
Description
When using QStackWidget or QTabWidget with a stylesheet, then navigating from one page to another can cause artifacts to appear in a widgets focus rect.
This seems to happen only when navigating away from a page with a visible focus rect to a new page containing a focus rect.
This can only be seen using Carbon. The Cocoa version seems to work correctly.
#include <QtGui> int main(int argc, char *argv[]) { QApplication a(argc, argv); QTabWidget *tabWidget; QWidget *tab; QLineEdit *lineEdit; QWidget *tab_2; QLineEdit *lineEdit_2; QWidget *Form = new QWidget; //removing the stylesheet is enough to remove the issue. Form->setStyleSheet(QString::fromUtf8("QLineEdit { }")); Form->resize(400, 300); tabWidget = new QTabWidget(Form); tabWidget->setObjectName(QString::fromUtf8("tabWidget")); tabWidget->setGeometry(QRect(50, 40, 261, 161)); tab = new QWidget(); tab->setObjectName(QString::fromUtf8("tab")); lineEdit = new QLineEdit(tab); lineEdit->setObjectName(QString::fromUtf8("lineEdit")); lineEdit->setGeometry(QRect(40, 20, 200, 22)); tabWidget->addTab(tab, QString()); tab_2 = new QWidget(); tab_2->setObjectName(QString::fromUtf8("tab_2")); lineEdit_2 = new QLineEdit(tab_2); lineEdit_2->setObjectName(QString::fromUtf8("lineEdit_2")); lineEdit_2->setGeometry(QRect(60, 22, 100, 22)); tabWidget->addTab(tab_2, QString()); Form->show(); return a.exec(); }