Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Design Tooling
  3. Qt Design Studio
  4. why i can't ever set Material theme for Qt.Quick.Window?
Forum Update on Monday, May 27th 2025

why i can't ever set Material theme for Qt.Quick.Window?

Scheduled Pinned Locked Moved Unsolved Qt Design Studio
2 Posts 2 Posters 461 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.
  • G Offline
    G Offline
    gry52
    wrote on last edited by
    #1

    Environments :
    Windows10
    Qt Creator 9.0.2
    Based on Qt 6.4.2 (MSVC 2019, x86_64)
    Qt Quick Designer plugin 9.0.2
    pySide6
    python 3.11

    the documentation says like use

    ApplicationWindow {
        visible: true
        Material.theme: Material.Dark
        Material.accent: Material.Purple
    }
    

    okay i got it. but when i tried to do it, Qt Creator gives me error

    This type (ApplicationWindow) is not supported as a root element by Qt Design Studio.

    and if i try

    Window {
        visible: true
        Material.theme: Material.Dark
        Material.accent: Material.Purple
    }
    

    it only change the accent and some button styles but Background is still white and not all changing the theme.
    i tried to find any information about it but i can't find any solutions anywhere.

    i can't find qtquickcontrols2.conf, so i just made one and run, it didn't work either.
    adding QT_QUICK_CONTROLS_MATERIAL_THEME="Dark" on main.py, didn't work

    i can't find any proper approaches.
    can someone explain me how to set the Material theme on Qt.Quick(with Qt Design Studio) or at least link me document or explanation of proper way to apply it?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas Hartmann
      wrote on last edited by
      #2

      You could use ApplicationWindow in the App.qml file that defines the main entry point fo your application.
      In this case the wysiwyg editor will not support the file anymore, but since it only contains boiler plate code, this should not be an issue.

      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