QMacToolBarItem Class▲
-
Header: QMacToolBarItem
-
Since: Qt 5.3
-
qmake: QT += macextras
-
Inherits: QObject
Detailed Description▲
All items should have the text and icon properites set, or have the standardItem property set to something else than NoStandardItem.
See Also▲
See also QMacToolBar
Member Type Documentation▲
enum QMacToolBarItem::StandardItem▲
Constant |
Value |
Description |
---|---|---|
QMacToolBarItem::NoStandardItem |
0 |
Don't use a standard item |
QMacToolBarItem::Space |
1 |
A spacing item |
QMacToolBarItem::FlexibleSpace |
2 |
A spacing item which grows to fill available space |
Property Documentation▲
icon : QIcon▲
This property holds the item's icon.
Access functions:
-
icon() const
-
void setIcon(const &icon)
selectable : bool▲
This property holds whether the item is selecatble
This property's default is false.
Access functions:
-
bool selectable() const
-
void setSelectable(bool selectable)
standardItem : StandardItem▲
This property holds whether the item is a standard item.
This property's default is NoStandardItem, in which case the icon and text property determines the item contents.
Setting this property to somthing else than NoStandardItem takes precendense over icon and text.
Access functions:
-
standardItem() const
-
void setStandardItem( standardItem)
text : QString▲
This property holds the item's text.
Access functions:
-
text() const
-
void setText(const &text)
Member Function Documentation▲
[explicit] QMacToolBarItem::QMacToolBarItem(QObject *parent = nullptr)▲
Constructs a QMacToolBarItem with parent.
[virtual] QMacToolBarItem::~QMacToolBarItem()▲
Destroys a QMacToolBarItem
void QMacToolBarItem::activated()▲
This signal is emitted when the toolbar item is clicked or otherwise activated.
NSToolbarItem *QMacToolBarItem::nativeToolBarItem() const▲
Returns the native NSToolbarItem.