Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4201

Artifacts being painted in the focus rect when using stylesheet - Mac OS X

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.5.1, 4.5.2, 4.5.3, 4.6.0
    • GUI: Look'n'Feel
    • None
    • macOS

    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();
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes