row(0),
position(Beginning),
selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets),
- documentMode(false)
+ documentMode(false),
+ features(QStyleOptionTab::None)
{
}
row(0),
position(Beginning),
selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets),
- documentMode(false)
+ documentMode(false),
+ features(QStyleOptionTab::None)
{
}
*/
/*!
+ \enum QStyleOptionTab::TabFeature
+
+ Describes the various features that a tab button can have.
+
+ \value None A normal tab button.
+ \value HasFrame The tab button is positioned on a tab frame
+
+ \sa features
+*/
+
+/*!
\variable QStyleOptionTab::leftButtonSize
\brief the size for the left widget on the tab.
enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
enum CornerWidget { NoCornerWidgets = 0x00, LeftCornerWidget = 0x01,
RightCornerWidget = 0x02 };
+ enum TabFeature { None = 0x00, HasFrame = 0x01 };
Q_DECLARE_FLAGS(CornerWidgets, CornerWidget)
+ Q_DECLARE_FLAGS(TabFeatures, TabFeature)
QTabBar::Shape shape;
QString text;
bool documentMode;
QSize leftButtonSize;
QSize rightButtonSize;
+ TabFeatures features;
QStyleOptionTab();
QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
#ifndef QT_NO_TABWIDGET
if (const QTabWidget *tw = qobject_cast<const QTabWidget *>(parentWidget())) {
+ option->features |= QStyleOptionTab::HasFrame;
if (tw->cornerWidget(Qt::TopLeftCorner) || tw->cornerWidget(Qt::BottomLeftCorner))
option->cornerWidgets |= QStyleOptionTab::LeftCornerWidget;
if (tw->cornerWidget(Qt::TopRightCorner) || tw->cornerWidget(Qt::BottomRightCorner))