Controls 2 ignores sub menus



  • Hello,

    I'm trying to create a context menu using new controls 2 and have noticed that submenus now are just ignored. Only MenuItems are visualized. With previous controls everything was normal. Any advice? Here is an example, first item "More Stuff" is not shown

    Menu {
                id: menu
    
                title: "Edit"
    
                Menu {
                    title: "More Stuff"
    
                    MenuItem {
                        text: "Do Nothing"
                    }
                }
                MenuItem {
                    text: "Cut"
                }
                MenuItem {
                    text: "Copy"
                }
                MenuItem {
                    text: "Paste
                }
            }
    
    


  • Cascading submenus, being such a traditional desktop feature, are not implemented in Qt Quick Controls 2, which have been so far mostly focusing on embedded and mobile. Qt Quick Controls 2.1 (in the upcoming Qt 5.8 release) provides experimental light-weight wrappers for "platform" menus. This is naturally not a long-term solution, but eases up the situation a bit. You can read more in the Qt Quick Controls 2.1 and Beyond blog post.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.