以下成员源于类 QMenu are part of the Qt compatibility layer. We advise against using them in new code.
| QKeySequence | accel (int id ) const |
| void | activateItemAt (int index ) |
| void | changeItem (int id , const QString & text ) |
| void | changeItem (int id , const QPixmap & pixmap ) |
| void | changeItem (int id , const QIcon & icon , const QString & text ) |
| bool | connectItem (int id , const QObject * receiver , const char * member ) |
| uint | count () const |
| bool | disconnectItem (int id , const QObject * receiver , const char * member ) |
| QMenuItem * | findItem (int id ) const |
| QMenuItem * | findPopup (QMenu * popup , int * index ) |
| int | frameWidth () const |
| QIcon | iconSet (int id ) const |
| int | idAt (int index ) const |
| int | indexOf (int id ) const |
| int | insertItem (const QString & text , const QObject * receiver , const char * member , const QKeySequence & shortcut = 0, int id = -1, int index = -1) |
| int | insertItem (const QIcon & icon , const QString & text , const QObject * receiver , const char * member , const QKeySequence & shortcut = 0, int id = -1, int index = -1) |
| int | insertItem (const QPixmap & pixmap , const QObject * receiver , const char * member , const QKeySequence & shortcut = 0, int id = -1, int index = -1) |
| int | insertItem (const QString & text , int id = -1, int index = -1) |
| int | insertItem (const QIcon & icon , const QString & text , int id = -1, int index = -1) |
| int | insertItem (const QString & text , QMenu * popup , int id = -1, int index = -1) |
| int | insertItem (const QIcon & icon , const QString & text , QMenu * popup , int id = -1, int index = -1) |
| int | insertItem (const QPixmap & pixmap , int id = -1, int index = -1) |
| int | insertItem (const QPixmap & pixmap , QMenu * popup , int id = -1, int index = -1) |
| int | insertItem (QMenuItem * item , int id = -1, int index = -1) |
| int | insertSeparator (int index = -1) |
| int | insertTearOffHandle (int a = 0, int b = 0) |
| bool | isCheckable () const |
| bool | isItemActive (int id ) const |
| bool | isItemChecked (int id ) const |
| bool | isItemEnabled (int id ) const |
| bool | isItemVisible (int id ) const |
| QFont | itemFont (int id ) const |
| QRect | itemGeometry (int index ) |
| int | itemParameter (int id ) const |
| QPixmap | pixmap (int id ) const |
| void | popup (const QPoint & pos , int indexAtPoint ) |
| void | removeItem (int id ) |
| void | removeItemAt (int index ) |
| void | setAccel (const QKeySequence & key , int id ) |
| void | setActiveItem (int id ) |
| void | setCheckable (bool checkable ) |
| void | setId (int index , int id ) |
| void | setItemChecked (int id , bool check ) |
| void | setItemEnabled (int id , bool enable ) |
| void | setItemFont (int id , const QFont & font ) |
| bool | setItemParameter (int id , int param ) |
| void | setItemVisible (int id , bool visible ) |
| void | setWhatsThis (int id , const QString & w ) |
| QString | text (int id ) const |
| QString | whatsThis (int id ) const |
| void | activated (int itemId ) |
| void | highlighted (int itemId ) |
| int | columns () const |
| int | itemAtPos (const QPoint & p , bool ignoreSeparator = true) |
| int | itemHeight (int index ) |
| int | itemHeight (QMenuItem * mi ) |
Use shortcut() on the relevant QAction 代替。
另请参阅 setAccel ().
Use activate() on the relevant QAction 代替。
[signal]
void
QMenu::
activated
(
int
itemId
)
使用 triggered () 代替。
Use setText() on the relevant QAction 代替。
Use setText() on the relevant QAction 代替。
使用 setIcon () and setText() on the relevant QAction 代替。
[protected]
int
QMenu::
columns
() const
使用 columnCount () 代替。
使用 connect () on the relevant QAction 代替。
使用 actions ().count() instead.
使用 disconnect () on the relevant QAction 代替。
Use actions instead.
使用 style ()->pixelMetric( QStyle::PM_MenuPanelWidth , this) instead.
[signal]
void
QMenu::
highlighted
(
int
itemId
)
使用 hovered () 代替。
使用 icon () on the relevant QAction 代替。
Use actions instead.
使用 actions ().indexOf(action) on the relevant QAction 代替。
使用 insertAction () or one of the addAction () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertMenu () or one of the addMenu () overloads instead.
使用 insertMenu () or one of the addMenu () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertMenu () or one of the addMenu () overloads instead.
使用 insertAction () or one of the addAction () overloads instead.
使用 insertSeparator () 重载接受 QAction * parameter instead.
使用 setTearOffEnabled () 代替。
Not necessary anymore. Always returns true.
使用 activeAction () 代替。
Use isChecked() on the relevant QAction 代替。
使用 isEnabled () on the relevant QAction 代替。
使用 isVisible () on the relevant QAction 代替。
[protected]
int
QMenu::
itemAtPos
(const
QPoint
&
p
,
bool
ignoreSeparator
= true)
Use actions instead.
使用 font () on the relevant QAction 代替。
另请参阅 setItemFont ().
使用 actionGeometry () on the relevant QAction 代替。
[protected]
int
QMenu::
itemHeight
(
int
index
)
使用 actionGeometry ( actions ().value(index)). height () 代替。
[protected]
int
QMenu::
itemHeight
(
QMenuItem
*
mi
)
使用 actionGeometry () 代替。
使用 QAction::data () 代替。
另请参阅 setItemParameter ().
使用 QPixmap ( icon ()) on the relevant QAction 代替。
使用 popup () on the relevant QAction 代替。
使用 removeAction () 代替。
使用 removeAction () 代替。
Use setShortcut() on the relevant QAction 代替。
另请参阅 accel ().
使用 setActiveAction () 代替。
Not necessary anymore. The checkable 参数被忽略。
另请参阅 isCheckable ().
Use actions instead.
Use setChecked() on the relevant QAction 代替。
另请参阅 isItemChecked ().
使用 setEnabled () on the relevant QAction 代替。
另请参阅 isItemEnabled ().
使用 setFont () on the relevant QAction 代替。
另请参阅 itemFont ().
使用 QAction::setData () 代替。
另请参阅 itemParameter ().
使用 setVisible () on the relevant QAction 代替。
另请参阅 isItemVisible ().
Use setWhatsThis() on the relevant QAction 代替。
另请参阅 whatsThis ().
Use text() on the relevant QAction 代替。
Use whatsThis() on the relevant QAction 代替。
另请参阅 setWhatsThis ().