The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.
enum | Separator { Never, InWindowsStyle } |
QMenuBar ( QWidget * parent, const char * name ) | |
QKeySequence | accel ( int id ) const |
void | activateItemAt ( int index ) |
bool | autoGeometry () const |
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 |
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 | insertSeparator ( int index = -1 ) |
bool | isItemActive ( int id ) const |
bool | isItemChecked ( int id ) const |
bool | isItemEnabled ( int id ) const |
bool | isItemVisible ( int id ) const |
int | itemParameter ( int id ) const |
int | margin () const |
QPixmap | pixmap ( int id ) const |
void | removeItem ( int id ) |
void | removeItemAt ( int index ) |
Separator | separator () const |
void | setAccel ( const QKeySequence & key, int id ) |
void | setAutoGeometry ( bool b ) |
void | setItemChecked ( int id, bool check ) |
void | setItemEnabled ( int id, bool enable ) |
bool | setItemParameter ( int id, int param ) |
void | setItemVisible ( int id, bool visible ) |
void | setMargin ( int margin ) |
void | setSeparator ( Separator sep ) |
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 | itemAtPos ( const QPoint & p ) |
QRect | itemRect ( int index ) |
Constant | Value |
---|---|
QMenuBar::Never | 0 |
QMenuBar::InWindowsStyle | 1 |
Use one of the constructors that doesn't take the name argument and then use setObjectName() instead.
Use shortcut() on the relevant QAction instead.
See also setAccel().
Use activate() on the relevant QAction instead.
Use triggered() instead.
Returns true if the menu bar automatically resizes itself when its parent widget is resized; otherwise returns false.
This feature is provided to help porting to Qt 4. We recommend against using it in new code.
See also setAutoGeometry().
Use setText() on the relevant QAction instead.
Use setText() on the relevant QAction instead.
Use setIcon() and setText() on the relevant QAction instead.
Use connect() on the relevant QAction instead.
Use actions().count() instead.
Use disconnect() on the relevant QAction instead.
Use actions instead.
Use style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, this) instead.
Use hovered() instead.
Use icon() on the relevant QAction instead.
Use actions instead.
Use actions().indexOf(action) on the relevant QAction instead.
Use one of the insertAction() or addAction() overloads instead.
Use one of the insertAction() or addAction() overloads instead.
Use one of the insertAction(), addAction(), insertMenu(), or addMenu() overloads instead.
Use one of the insertAction() or addAction() overloads instead.
Use one of the insertAction(), addAction(), insertMenu(), or addMenu() overloads instead.
Use one of the insertMenu(), or addMenu() overloads instead.
Use one of the insertMenu(), or addMenu() overloads instead.
Use one of the insertAction(), addAction(), insertMenu(), or addMenu() overloads instead.
Use one of the insertMenu(), or addMenu() overloads instead.
Use addSeparator() or insertAction() instead.
For example, if you have code like
menuBar->insertSeparator();
you can rewrite it as
menuBar->addSeparator();
This function was introduced in Qt 4.2.
Use activeAction() instead.
Use isChecked() on the relevant QAction instead.
Use isEnabled() on the relevant QAction instead.
Use isVisible() on the relevant QAction instead.
There is no equivalent way to achieve this in Qt 4.
Use QAction::data() instead.
See also setItemParameter().
Use actionGeometry() on the relevant QAction instead.
Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
See also setMargin() and QWidget::getContentsMargins().
Use QPixmap(icon()) on the relevant QAction instead.
Use removeAction() instead.
Use removeAction() instead.
This function is provided only to make old code compile.
See also setSeparator().
Use setShortcut() on the relevant QAction instead.
See also accel().
Sets whether the menu bar should automatically resize itself when its parent widget is resized.
This feature is provided to help porting to Qt 4. We recommend against using it in new code.
See also autoGeometry().
Use setChecked() on the relevant QAction instead.
See also isItemChecked().
Use setEnabled() on the relevant QAction instead.
See also isItemEnabled().
Use QAction::setData() instead.
See also itemParameter().
Use setVisible() on the relevant QAction instead.
See also isItemVisible().
Sets the width of the margin around the contents of the widget to margin.
Use QWidget::setContentsMargins() instead.
See also margin() and QWidget::setContentsMargins().
This function is provided only to make old code compile.
See also separator().
Use setWhatsThis() on the relevant QAction instead.
See also whatsThis().
Use text() on the relevant QAction instead.
Use whatsThis() on the relevant QAction instead.
See also setWhatsThis().