-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QtQuick Controls 2 UM.MenuItem #799
Comments
For the second part of the issue, there seems to be a solution: |
I've just tried to add it, but it does cause a binding loop somewhere... I will try to find what is causing it |
I made a PR (#800), but I did not see the binding loop. I may be overlooking it, since at the same time I am fixing SidebarGUI with the latest QtQuick Controls 2 changes... Perhaps it is caused by the implicitWidth set in |
Good hunch (I hope so, because I had the same one), I tried to mess around with that a bit but it didn't seem to go away. It does seem to actually work (the size is as I'd expect it to be) but the error spam makes me a bit worried. |
So i think i found what causes it, but I haven't found a fix for it. The binding loops are caused by having a nested menu. If you have a menu with only menu items, it works just fine. At the moment that you have a menu with a menu inside of it, you get binding loops. |
What version of QT are you on? I am still using 5.15.0 at this point (on Windows), and I don't see the binding loops with #800 (with or without Sidebar GUI). |
QT: 5.15.2 |
I can see the binding loop now too after updating my PyQt. I'll see if I can make it go away again (using another method then to downgrade to PyQt 5.15.0 again, which works by the way). Edit: the binding loops start with PyQt 5.15.1. Not that knowing that has helped me much sofar... |
The problem was the Edit: Nope, not yet... |
I think I got it now... |
#800 fixed the menu width and eliding, but using an |
Since the introduction of the QtQuick Controls 2 UM.MenuItem, it is no longer possible to display an ampersand ("&") in menu items, because any ampersand is treated as a prefix for a keyboard shortcut. The markup does not not work well on a ampersand followed by a space:
Eliding long(-ish) menuitem labels is a bit of a problematic solution to not being able to auto-adjust the width of the (sub) menu; The convention is that a menuitem that has an ellipsis denotes an action that has further interaction. For example a "Save as..." item has an ellipsis because it opens a filename dialog, but a "Save" item has no ellipsis (because a normal "Save" does not require user interaction). Eliding long(ish) menuitems unpredictably suggests further interaction to the user that may or may not happen.
The text was updated successfully, but these errors were encountered: