| 90 | // class ContainerTabBar |
| 91 | |
| 92 | class ContainerTabBar : public QTabBar |
| 93 | { |
| 94 | Q_OBJECT |
| 95 | |
| 96 | public: |
| 97 | explicit ContainerTabBar(Container* container) |
| 98 | : QTabBar(container), m_container(container) |
| 99 | { |
| 100 | if (QApplication::style()->objectName() == QLatin1String("macintosh")) { |
| 101 | static QPointer<QStyle> qTabBarStyle = QStyleFactory::create(QStringLiteral("fusion")); |
| 102 | if (qTabBarStyle) { |
| 103 | setStyle(qTabBarStyle); |
| 104 | } |
| 105 | } |
| 106 | // configure the QTabBar style so it behaves as appropriately as possible, |
| 107 | // even if we end up using the native Macintosh style because the user's |
| 108 | // Qt doesn't have the Fusion style installed. |
| 109 | setDocumentMode(true); |
| 110 | setUsesScrollButtons(true); |
| 111 | setElideMode(Qt::ElideNone); |
| 112 | } |
| 113 | |
| 114 | bool event(QEvent* ev) override { |
| 115 | if(ev->type() == QEvent::ToolTip) |