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. Qt Quick controls styling ToolBar, MenuBar and StatusBar
Forum Updated to NodeBB v4.3 + New Features

Qt Quick controls styling ToolBar, MenuBar and StatusBar

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.7k 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.
  • Z Offline
    Z Offline
    Zeiko
    wrote on last edited by
    #1

    Hello,

    I just started to play around a bit with styling the qt quick controls and don't see any ToolBarStyle, any ideas how to style the toolbar and the other components that lacks a built in style?

    Regards,

    Zeiko

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      The simple answer is that you can only style those components that provide a style at the moments. The others will come in a later version. This includes MenuBar which is tricky as it depends on the platform if it can even be styled or not (think mac os/ubuntu). But ToolBar and StatusBar are actually quite easy to work around. Both of them can be replaced by any item. Ie to create a custom toolbar all you have to do is:

      @toolBar: Rectangle {
      color: "red"
      height: 40
      width: parent.width
      }@

      StatusBar is similar. The only drawback is that you have to provide your own margins and the tool bar will not automatically adjust to content height but that should be easily solved by adding anchors or a layout.

      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