[GB.QT5]
* 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:
parent
8db832ff4c
commit
7d845b89a5
2 changed files with 17 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue