Nominate our 2022 Qt Champions!

QtQuick Controls: Material Style not found?

  • A while back I had a running installation of Qt 5.12.4 on Ubuntu 19.04. Had some problems and had to reinstall everything on Manjaro 20.0.3 except this time I upgraded to Qt 5.12.8 and Qt Creator 4.12.3

    According to what I've read:

    And previous versions of my application running on my desktop :


    Material style should be working, I haven't modified the code, here is a snippet of my main.qml:

    import QtQuick 2.12
    import QtQuick.Controls 2.12
    import QtQuick.VirtualKeyboard 2.4
    import MqttClient 1.0
    import QtQuick.Window 2.12
    import QtQuick.Layouts 1.12
    import QtCharts 2.3
    import QtQuick.Controls.Material 2.12

    Also here is my qtquickcontrols2.conf:


    When I run the application on my desktop it looks like this now:

    Screenshot from 2020-07-04 14-37-12.png

    With the following on Application Output console :

    QApplication: invalid style override passed, ignoring it.
        Available styles: Windows, Fusion

    Funnily enough the theme is correct on Android but the screen is not scaled properly now (but that is another issue)
    Any ideas on where to look or what could've changed?

  • Any luck with this? I see that in QT /qml/QtQuick/Controls/Styles/ does not have Material. I custom compile QT, what am I missing?

  • Solved it by adding the line


    in main.cpp