* NEW: Dirty hack that disables the new Qt5 mouse click replayed after a 
  popup has been closed.


git-svn-id: svn://localhost/gambas/trunk@7106 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-05-30 13:26:17 +00:00
parent 8db832ff4c
commit 7d845b89a5
2 changed files with 17 additions and 1 deletions

View file

@ -327,7 +327,7 @@ BEGIN_METHOD(Menu_new, GB_OBJECT parent; GB_BOOLEAN hidden)
if (!menu->menu)
{
menu->menu = new QMenu();
menu->menu = new MyMenu();
menu->menu->setSeparatorsCollapsible(true);
((QAction *)(menu->widget.widget))->setMenu(menu->menu);
@ -1051,3 +1051,12 @@ void CMenu::slotDestroyed(void)
#endif
}
//---------------------------------------------------------------------------
void MyMenu::setVisible(bool visible)
{
if (!visible)
setAttribute(Qt::WA_NoMouseReplay);
QMenu::setVisible(visible);
}

View file

@ -115,6 +115,13 @@ public slots:
void slotHidden();
};
class MyMenu: public QMenu
{
public:
virtual void setVisible(bool visible);
};
void CMENU_popup(CMENU *_object, const QPoint &pos);
#endif