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 ().