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. 5.8(beta) Default style attributes?

5.8(beta) Default style attributes?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 567 Views
  • 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.
  • E Offline
    E Offline
    Eeli K
    wrote on last edited by Eeli K
    #1

    In 5.8 beta the Default style .qml files seem to have something like Default style attributes. Previously the colors were hardcoded, now for example TabButton.qml has:

    //! [background]
        background: Rectangle {
            implicitHeight: 40
            color: control.down
                ? (control.checked ? Default.tabButtonCheckedPressedColor : Default.tabButtonPressedColor)
                : (control.checked ? "transparent" : Default.tabButtonColor)
        }
        //! [background]
    
    

    Is there a way to know and use "Default.tabButtonColor" etc.?

    EDIT: Quick Controls 2, of course.

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      By trial and error I found out that I can

      import QtQuick.Controls.impl 2.1
      

      and it works. It's not documented (at least quickly looking at the 5.8 snapshot documentation for styles and styling). I don't know if there are any drawbacks.

      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