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 6.5 with WASM doesn't seem to read qtquickcontrols2.conf

Qt 6.5 with WASM doesn't seem to read qtquickcontrols2.conf

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 277 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.
  • B Offline
    B Offline
    Babalas
    wrote on last edited by Babalas
    #1

    In this first instance I have the WASM build on the left, with the native build on the right.
    qtquickcontrols2.conf

    [Controls]
    Style=Material
    
    [Material]
    Theme=Dark
    

    Main.qml

    import QtQuick
    import QtQml
    import QtQuick.Controls
    import QtQuick.Layouts
    

    b3290f6d-38a9-44e0-aa90-2fa0ba08b08a-image.png

    However if I change the imports it works.
    Main.qml

    import QtQuick 2.15
    import QtQml 2.15
    import QtQuick.Controls 2.15
    import QtQuick.Layouts 1.15
    

    30529f03-c5e8-4660-9c99-b13ad9aabbba-image.png

    Also, noticed with a native build it'll ignore [Material\Palette] settings
    i.e. import QtQuick:
    7cc73c45-a37d-438e-96a4-ce8ec1a0d141-image.png

    import QtQuick 2.15:
    9d78ff8a-df2a-4d73-a43b-6f20f4634724-image.png

    Back to the WASM version I've tried:

    • QQuickStyle::setStyle("Material");
    • import QtQuick.Controls.Material

    Edit
    On closer inspection it appears that it is setting the Material style. I can see in the rounded buttons and curved drawer. What it isn't setting is the palette. If I add this to Main.qml it works

    	palette.base: "#363638"
    	palette.alternateBase: "#3c3c3d"
    	palette.light: "#696969"
    	palette.midlight: "#575757"
    	palette.button: "#464646"
    	palette.mid: "#343434"
    	palette.dark: "#232323"
    	palette.brightText: "#ffffff"
    	palette.buttonText: "#eff0f1"
    	palette.highlight: "#326ba6"
    	palette.highlightedText: "#ffffff"
    	palette.link: "#2980b9"
    	palette.linkVisited: "#7f8c8d"
    	palette.shadow: "#000000"
    	palette.text: "#b6babf"
    	palette.toolTipBase: "#000000"
    	palette.toolTipText: "#eff0f1"
    	palette.window: "#28282b"
    	palette.windowText: "#ffffff"
    
    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