Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.4/Android 4.4.2: ToolButton background on touch

Qt 5.4/Android 4.4.2: ToolButton background on touch

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 761 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lynic
    wrote on last edited by
    #1

    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,

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lynic
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved