Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Toolbar buttons are not visible in simulator
Qt 6.11 is out! See what's new in the release blog

Toolbar buttons are not visible in simulator

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.5k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I'm creating a new Qt Quick application. Added two more toolbar buttons to the default toolbar, in addition to the back button. To my surprise, those buttons are not displayed in simulator at all.

    The buttons:

    @ ToolBar {
    id: toolBar
    anchors.bottom: window.bottom
    tools: ToolBarLayout {
    id: toolBarLayout
    ToolButton {
    flat: true
    iconSource: "toolbar-back"
    onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
    }

            ToolButton {
                id: settingsButton
                x: 289
                y: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                iconSource: "toolbar-settings"
                flat: true
            }
    
            ToolButton {
                id: infoButton
                x: 151
                y: 0
                width: 58
                height: 60
                iconSource: "bitmaps/info_button_toolbar.png"
                anchors.horizontalCenter: parent.horizontalCenter
                flat: true
            }
        }
    }@
    

    Those buttons are nicely visible in designer + on Nokia N8 hardware. Why simulator won't display them?

    Project is rebuilt few times + restarted Qt Creator to no result.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Do you bitmaps in DEPLOYMENTFOLDERS in .pro?
      If you are using shadow build, that needs to be setup, or you need to manually copy the bitmap dir to build directory.

      When running in simulator it will try to look in the executable directory (application dir) subdir
      "bitmaps" for the png.

      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