QMacToolBarItem Class
The QMacToolBarItem class provides an item for QMacToolBar. 更多...
头文件: | #include <QMacToolBarItem> |
qmake: | QT += macextras |
开始支持版本: | Qt 5.3 |
基类: | QObject |
公有类型
enum | StandardItem { NoStandardItem, Space, FlexibleSpace } |
属性
- icon : QIcon
- selectable : bool
- standardItem : StandardItem
- text : QString
- 1 个属性继承自 QObject
公有函数
QMacToolBarItem(QObject *parent = Q_NULLPTR) | |
virtual | ~QMacToolBarItem() |
QIcon | icon() const |
NSToolbarItem * | nativeToolBarItem() const |
bool | selectable() const |
void | setIcon(const QIcon &icon) |
void | setSelectable(bool selectable) |
void | setStandardItem(StandardItem standardItem) |
void | setText(const QString &text) |
StandardItem | standardItem() const |
QString | text() const |
- 32 个公有函数继承自 QObject
信号
void | activated() |
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QMacToolBarItem class provides an item for QMacToolBar.
All items should have the text and icon properites set, or have the standardItem property set to something else than NoStandardItem.
参见 QMacToolBar.
成员类型
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 |
属性
icon : QIcon
This property holds the item's icon.
访问函数:
QIcon | icon() const |
void | setIcon(const QIcon &icon) |
selectable : bool
This property holds whether the item is selecatble
This property's default is false.
访问函数:
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.
访问函数:
StandardItem | standardItem() const |
void | setStandardItem(StandardItem standardItem) |
text : QString
This property holds the item's text.
访问函数:
QString | text() const |
void | setText(const QString &text) |
成员函数
QMacToolBarItem::QMacToolBarItem(QObject *parent = Q_NULLPTR)
Constructs a QMacToolBarItem with parent.
[virtual]
QMacToolBarItem::~QMacToolBarItem()
Destroys a QMacToolBarItem
[signal]
void QMacToolBarItem::activated()
This signal is emitted when the toolbar item is clicked or otherwise activated.
NSToolbarItem *QMacToolBarItem::nativeToolBarItem() const
Returns the native NSToolbarItem.