emit statusChanged when it closes
This commit is contained in:
parent
a0dc83699d
commit
9a9d85c5e9
@ -32,6 +32,10 @@ QMenuProxy::QMenuProxy (QObject *parent)
|
|||||||
{
|
{
|
||||||
m_menu = new QMenu(0);
|
m_menu = new QMenu(0);
|
||||||
connect(m_menu, &QMenu::triggered, this, &QMenuProxy::itemTriggered);
|
connect(m_menu, &QMenu::triggered, this, &QMenuProxy::itemTriggered);
|
||||||
|
connect(m_menu, &QMenu::aboutToHide, [=]() {
|
||||||
|
m_status = DialogStatus::Closed;
|
||||||
|
emit statusChanged();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenuProxy::~QMenuProxy()
|
QMenuProxy::~QMenuProxy()
|
||||||
@ -200,8 +204,6 @@ void QMenuProxy::open(int x, int y)
|
|||||||
void QMenuProxy::close()
|
void QMenuProxy::close()
|
||||||
{
|
{
|
||||||
m_menu->hide();
|
m_menu->hide();
|
||||||
m_status = DialogStatus::Closed;
|
|
||||||
emit statusChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "qmenu.moc"
|
#include "qmenu.moc"
|
||||||
|
Loading…
Reference in New Issue
Block a user