Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

Compatibility Members for QAction

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QAction class reference

Public Functions

Signals


Member Function Documentation

QAction::QAction ( QObject * parent, const char * name )

Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.

QAction::QAction ( const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name )

Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.

QAction::QAction ( const QIcon & icon, const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name )

Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.

QKeySequence QAction::accel () const

Use shortcut() instead.

void QAction::activated ( int i = 0 )   [signal]

Use triggered() instead.

bool QAction::addTo ( QWidget * w )

Use QWidget::addAction() instead.

For example, if you have code like

    action->addTo(widget);

you can rewrite it as

    widget->addAction(action);

QIcon QAction::iconSet () const

Use icon() instead.

bool QAction::isOn () const

Use isChecked() instead.

bool QAction::isToggleAction () const

Use isCheckable() instead.

QString QAction::menuText () const

Use text() instead.

bool QAction::removeFrom ( QWidget * w )

Use QWidget::removeAction() instead.

For example, if you have code like

    action->removeFrom(widget);

you can rewrite it as

    widget->removeAction(action);

void QAction::setAccel ( const QKeySequence & shortcut )

Use setShortcut() instead.

void QAction::setIconSet ( const QIcon & i )

Use setIcon() instead.

void QAction::setMenuText ( const QString & text )

Use setText() instead.

void QAction::setOn ( bool b )

Use setChecked() instead.

void QAction::setToggleAction ( bool b )

Use setCheckable() instead.

void QAction::toggled ( bool b )   [signal]

Use checked() instead.


Copyright © 2004 Trolltech Trademarks
Qt 4.0.0-b1