triggered and triggerendindex signals

This commit is contained in:
Marco Martin 2011-12-21 21:55:32 +01:00
parent 1a4a4b8f45
commit fa35709952
2 changed files with 6 additions and 1 deletions

View File

@ -93,6 +93,10 @@ void QMenuProxy::itemTriggered(QAction *action)
QMenuItem *item = qobject_cast<QMenuItem *>(action);
if (item) {
emit triggered(item);
int index = m_items.indexOf(item);
if (index > -1) {
emit triggeredIndex(index);
}
}
}

View File

@ -58,7 +58,8 @@ public:
Q_SIGNALS:
void statusChanged();
void visualParentChanged();
void triggered(QMenuItem*);
void triggered(QMenuItem *item);
void triggeredIndex(int index);
private Q_SLOTS:
void itemTriggered(QAction *item);