PDA

View Full Version : qtoolbutton and not visible popup menu



_Jack_
25th January 2019, 09:36
Hi Qt Users,
I'm porting some code from qt 4.8.7 to qt 5.8.0 (using qt creator 4.7.2 and msvc_64).
Attached below you can find a minimal complete example reproducing the issue ( this code work in qt 4.8.7 and the popup menu appear triggering the recent button, after choosing some files with the dialog).

Basically this example is based on those example:
http://doc.qt.io/archives/qt-4.8/qt-mainwindows-recentfiles-example.html
https://www.walletfox.com/course/qtopenrecentfiles.php

But this example not works in qt 5.8.0 and the popup menu not appear even if the menu is present ( see the comment in the code).
I really do not understand what I'm forgetting to do ... someone has an idea ?
Thank you in advance for the answers

13014

_Jack_
26th January 2019, 23:15
I found that calling:

Recentmenu->show();
Recentmenu->activateWindow();

works.... but this seem a really strange behaviour.
Someone can point me in the right direction ?