Q3PopupMenu Class

The Q3PopupMenu class is a thin compatibility wrapper around QMenu . 更多...

頭: #include <Q3PopupMenu>
繼承: QMenu

公共函數

Q3PopupMenu (QWidget * parent = 0, const char * name = 0)
int exec ()
int exec (const QPoint & pos , int indexAtPoint = 0)
int margin () const
void setMargin (int margin )

額外繼承成員

詳細描述

The Q3PopupMenu class is a thin compatibility wrapper around QMenu .

使用 QMenu in new applications. Note that the menu's actions must be Q3Action

成員函數文檔編製

Q3PopupMenu:: Q3PopupMenu ( QWidget * parent = 0, const char * name = 0)

Constructs a menu with the given parent and name .

int Q3PopupMenu:: exec ()

Pops up the menu and returns the ID of the action that was selected.

另請參閱 QMenu::exec ().

int Q3PopupMenu:: exec (const QPoint & pos , int indexAtPoint = 0)

Pops up the menu at coordinate pos and returns the ID of the action that was selected.

indexAtPoint is specified, the menu will pop up with the item at index indexAtPoint under the mouse cursor.

另請參閱 QMenu::exec ().

int Q3PopupMenu:: margin () const

Returns the width of the margin around the contents of the widget.

此函數使用 QWidget::getContentsMargins () to get the margin.

該函數在 Qt 4.2 引入。

另請參閱 setMargin () 和 QWidget::getContentsMargins ().

void Q3PopupMenu:: setMargin ( int margin )

Sets the width of the margin around the contents of the widget to margin .

此函數使用 QWidget::setContentsMargins () to set the margin.

該函數在 Qt 4.2 引入。

另請參閱 margin () 和 QWidget::setContentsMargins ().