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

[macOS]: Close indicator not shown in QTabWidget document mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.2
    • None
    • macOS

    Description

      When using own QTabBar without parent in a document mode QTabWidget then the close indicator of tabs are missing, also noticed the hover effects are missing.

      This works all fine when I give 'this' as parent of the tab bar.

      #include <QtWidgets>
      
      class TabWidget : public QTabWidget
      {
          Q_OBJECT
      
      public:
          TabWidget(QWidget *parent = Q_NULLPTR)
              : QTabWidget(parent)
          {
              setTabBar(new QTabBar);
              setDocumentMode(true);
              setTabsClosable(true);
              addTab(new QLabel(tr("tab1"), this), tr("tab1"));
              addTab(new QLabel(tr("tab2"), this), tr("tab2"));
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          TabWidget w;
          w.show();
      
          return a.exec();
      }
      
      #include "main.moc"
      

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            filipe.azevedo Filipe Azevedo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes