Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.2
-
None
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"