Sub menu opening on wrong mouse button click in Qt5 (5.5.1) (on Windows (7?)?)?
I am wondering whether this is a general bug. Maybe someone could test it on her/his system.
Background: In a qt5(.5.1?) application (on Windows (7?)?) there is a small delay until sub menus open. The length of this delay seems to depend on a "ShowMenuDelay" variable in the Windows registry. This is also how it works in many other applications, but this delay setting seems only to be respected by Qt since version 5(.5.1?).
Steps to reproduce:
- Open a menu that contains a menu entry that opens a sub menu.
- Go to the menu entry that contains the submenu and immediately click the main button of the mouse (the left one by default).
The sub menu is not opened directly on the click.
The sub menu opens directly on the click.
Since the "MenuOpenDely" is set to a rather short time length by default the effect is not huge. But one can set the "MenuOpenDelay" to larger time spans so that the menu opens (almost) only after the menu has been clicked. (This setting is particularly useful for people with some disabilities because it makes navigating sub menus much easier, since for example different sub menus are not triggered just by hovering over them very briefly.)
What is actually the case is that the mouse buttons seem to be swapped when it comes to opening sub menus in Qt5(.5.1?). If one uses the secondary click (by default the right one) then the menu opens immediately. Again hard to notice with the default "ShowMenuDelay" but it is noticeable.
Hi and welcome to devnet,
Can you check that with the latest version of Qt ? Either the stable 5.6.0 or the 5.7 Beta ?
Hi and thanks,
Sorry, I am only a user. I guess one would need to access the source to test such things, right? However, I have now asked some developers whether they can check it.
No, you can just install them. Qt 5.6 is accessible through the online installer. The beta is accessible from the download page at the bottom.
Just installed Qt 5.6. Programs still use the version they used to use (5.5.1).
(So I cannot test it myself.)
You can replace the dll's in your program folder by the one provided by the installer.
racoon last edited by racoon
@SGaist Does not work either. The program just starts to complain about missing dlls, like libgcc_s_dw2-1.dll.
Isn't there a simpler way to test qt sub menus? Like an example application that contains already all the dlls and has sub menus?
You can build and run the Menus Example example
@SGaist As I said, I am not a developer. The Menus Example example seems to me not self-explanatory. What are the steps to build and run it?
- Launch Qt Creator
- On the welcome screen select Examples
- In the search file, put Menus
- Click on it
- Configure the project with the default provided
- Click the run arrow
@SGaist Thanks for the instruction. I have tried it in Qt5.6 and the bug still persists. I have not tried beta Qt5.7. Is there any reason to think that the bug is fixed?
I don't know whether there's been work done on that part but it's worth a try.
@SGaist I have found no the betas (http://download.qt.io/development_releases/qt/5.7/5.7.0-beta/). Do you know which one should I install for Windows 7 64bit?
What about all the
@SGaist I would have thought that one of them would be enough. Also some say something about Android in addition. Isn't that a phone OS?
Anyway, I have now installed and tested and the bug is still there. If I write up the details of the bug would you be able to file a report or tell me how that is done?
One is enough, but on Windows you have several versions of Visual Studio that you can use and they are not compatible one with the other and there's also MinGW without forgetting 32 vs 64 bit. That's why there are several packages.
Android does more than just phones. Qt has been ported to Android since several years (also iOS for that matter).
You can do it on the bug report system
Filed a bug report at https://bugreports.qt.io/browse/QTBUG-53054.