TComboBox Class
下拉框 More...
| Header: | #include <TComboBox> |
| Inherits: | QComboBox and TUiInterface |
Properties
- currentName : QString
- itemList : QList<QVariant>
- searchable : bool
- wheelEnabled : bool
Public Functions
| TComboBox(QWidget *parent = 0) | |
| ~TComboBox() |
Reimplemented Public Functions
Public Slots
| QIcon | currentIcon() |
| QString | currentName() |
| QVariant | currentUserData() |
| virtual QVariant | getData(const QString &key = "", const QVariant &options = QVariant()) |
| bool | isSearchable() |
| bool | isWheelEnabled() |
| QList<QVariant> | itemList() |
| void | setCurrentName(const QString &iCurNameStr) |
| virtual void | setData(const QString &iKey, const QVariant &iData) |
| void | setItemEnable(const QString &iName, bool iBol = true) |
| void | setItemList(QList<QVariant> iItemLst) |
| void | setItemVisible(const QString &iName, bool iBol = true) |
| void | setSearchable(bool iYBol) |
| void | setWheelEnabled(bool iYBol) |
- 5 public slots inherited from QComboBox
- 9 public slots inherited from TUiInterface
- 19 public slots inherited from QWidget
Signals
| void | itemListChanged() |
| virtual void | notification(const QString &type, const QVariant &data = QVariant(), const QString &uuid = QStringLiteral( "" )) |
- 8 signals inherited from QComboBox
- 1 signal inherited from TUiInterface
- 3 signals inherited from QWidget
Reimplemented Protected Functions
| virtual void | wheelEvent(QWheelEvent *iEvent) |
- 15 protected functions inherited from QComboBox
- 2 protected functions inherited from TUiInterface
- 35 protected functions inherited from QWidget
Additional Inherited Members
- 5 static public members inherited from QWidget
- 15 protected functions inherited from QComboBox
- 2 protected functions inherited from TUiInterface
- 35 protected functions inherited from QWidget
- 1 protected slot inherited from QWidget
Detailed Description
下拉框
Property Documentation
currentName : QString
Access functions:
| QString | currentName() |
| void | setCurrentName(const QString &iCurNameStr) |
itemList : QList<QVariant>
Access functions:
| QList<QVariant> | itemList() |
| void | setItemList(QList<QVariant> iItemLst) |
Notifier signal:
| void | itemListChanged() |
searchable : bool
Access functions:
| bool | isSearchable() |
| void | setSearchable(bool iYBol) |
wheelEnabled : bool
Access functions:
| bool | isWheelEnabled() |
| void | setWheelEnabled(bool iYBol) |
Member Function Documentation
TComboBox::TComboBox(QWidget *parent = 0)
Default constructs an instance of TComboBox.
TComboBox::~TComboBox()
Destroys the instance of TComboBox.
[slot] QIcon TComboBox::currentIcon()
[slot] QString TComboBox::currentName()
获取当前选项名称
Note: Getter function for property currentName.
See also setCurrentName().
[slot] QVariant TComboBox::currentUserData()
[virtual slot] QVariant TComboBox::getData(const QString &key = "", const QVariant &options = QVariant())
[virtual] void TComboBox::hidePopup()
[virtual signal] void TComboBox::notification(const QString &type, const QVariant &data = QVariant(), const QString &uuid = QStringLiteral( "" ))
[slot] void TComboBox::setCurrentName(const QString &iCurNameStr)
设置当前选项为name是 iCurNameStr 的项
Note: Setter function for property currentName.
See also currentName().
[virtual slot] void TComboBox::setData(const QString &iKey, const QVariant &iData)
[slot] void TComboBox::setItemEnable(const QString &iName, bool iBol = true)
[slot] void TComboBox::setItemList(QList<QVariant> iItemLst)
*
设置选项列表 * iItemLst 格式如下 *
* [ * {icon:':/Mail.png',value:1,text:'item1'}, {icon:':/Home.png',value:2,text:'item2'}, {icon:':/Home.png',value:3,text:'item3'} ] *
Note: Setter function for property itemList.
See also itemList().