|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Q3PopupMenu Class Reference
[Qt3Support module]

The Q3PopupMenu class is a thin compatibility wrapper around QMenu. More...

     #include <Q3PopupMenu>

This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.

Inherits QMenu.

- List of all members, including inherited members

### Public Functions

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

- 35 public functions inherited from QMenu
- 206 public functions inherited from QWidget
- 29 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice

### Additional Inherited Members

- 4 properties inherited from QMenu
- 57 properties inherited from QWidget
- 1 property inherited from QObject
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 4 signals inherited from QMenu
- 1 signal inherited from QWidget
- 1 signal inherited from QObject
- 1 static public member inherited from QMenu
- 4 static public members inherited from QWidget
- 5 static public members inherited from QObject
- 1 static public member inherited from QPaintDevice
- 3 protected functions inherited from QMenu
- 38 protected functions inherited from QWidget
- 7 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget

## Detailed Description

The Q3PopupMenu class is a thin compatibility wrapper around QMenu.

Use QMenu in new applications. Note that the menu's actions must be Q3Actions.

## Member Function Documentation

### 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.

See also QMenu::exec().

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

This is an overloaded member function, provided for convenience.

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

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

See also QMenu::exec().

### int Q3PopupMenu::margin () const

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

This function uses QWidget::getContentsMargins() to get the margin.

This function was introduced in Qt 4.2.

See also setMargin() and QWidget::getContentsMargins().

### void Q3PopupMenu::setMargin ( int margin )

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

This function uses QWidget::setContentsMargins() to set the margin.

This function was introduced in Qt 4.2.

See also margin() and QWidget::setContentsMargins().