Qt 5.4/Android 4.4.2: ToolButton background on touch



  • Hi,

    When I add a toolbutton to a toolbar with the following code then the button's background does not change on a press event (the press event is fired):

    @
    ApplicationWindow {
    title: qsTr("Hello World")
    width: 640
    height: 480
    visible: true

    menuBar: MenuBar {
        Menu {
            title: qsTr("&File")
            MenuItem {
                text: qsTr("&Open")
                onTriggered: messageDialog.show(qsTr("Open action triggered"));
            }
            MenuItem {
                text: qsTr("E&xit")
                onTriggered: Qt.quit();
            }
        }
    }
    

    toolBar: ToolBar {
    RowLayout {
    anchors.fill: parent
    anchors.margins: spacing

            ToolButton {
                iconSource: "qrc:/images/test.png"
                checkable: true
            }
        }
    }
    

    }
    @

    The problem occurs on Android, but the button works fine on Windows. Is there something wrong with the code or is this behaviour intended?

    Regards,



  • Got it - I had to manually set the Holo theme in the Android manifest file. Now it's working fine.


Log in to reply
 

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