[Interest] QML Menu

Jérôme Godbout godboutj at amotus.ca
Wed Feb 28 15:33:50 CET 2018


you probbaly can bind the width with the menu width. You could do so with

Component.onCompleted:

{
// Fix android bad layout
 if(Qt.application.platform == 'Android')
   width = Qt.binding(function(){ return menu.width; });
}

You could wrap this into MenuItem.qml that is import after the QtQuick MenuItem this fix would now be transparent and when Qt fix it you just need to remove the import 😉

________________________________
From: Interest <interest-bounces+godboutj=amotus.ca at qt-project.org> on behalf of Igor Mironchik <igor.mironchik at gmail.com>
Sent: Wednesday, February 28, 2018 4:42 AM
To: Qt Project
Subject: [Interest] QML Menu


Hello,

    Menu {
        id: menu
        x: menuButton.x - width + menuButton.width - 2
        y: toolBar.y + toolBar.height

        MenuItem {
            text: qsTr( "Change Password" )
            implicitHeight: minimumCtrlHeight
            onTriggered: {
                qmlCppSignals.disconnectRequest()
            }
        }
    }

On Android the result is a shorten text of menu item whereas there is enough space to show full text. How can I fix it?

[Menu]

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180228/5aa64619/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_2018-02-28-12-29-27.png
Type: image/png
Size: 13025 bytes
Desc: Screenshot_2018-02-28-12-29-27.png
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180228/5aa64619/attachment.png>


More information about the Interest mailing list