triggered and triggerendindex signals
This commit is contained in:
parent
1a4a4b8f45
commit
fa35709952
@ -93,6 +93,10 @@ void QMenuProxy::itemTriggered(QAction *action)
|
|||||||
QMenuItem *item = qobject_cast<QMenuItem *>(action);
|
QMenuItem *item = qobject_cast<QMenuItem *>(action);
|
||||||
if (item) {
|
if (item) {
|
||||||
emit triggered(item);
|
emit triggered(item);
|
||||||
|
int index = m_items.indexOf(item);
|
||||||
|
if (index > -1) {
|
||||||
|
emit triggeredIndex(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,8 @@ public:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void statusChanged();
|
void statusChanged();
|
||||||
void visualParentChanged();
|
void visualParentChanged();
|
||||||
void triggered(QMenuItem*);
|
void triggered(QMenuItem *item);
|
||||||
|
void triggeredIndex(int index);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void itemTriggered(QAction *item);
|
void itemTriggered(QAction *item);
|
||||||
|
Loading…
Reference in New Issue
Block a user