5.8(beta) Default style attributes?



  • 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.



  • 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.


Log in to reply
 

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