Unsolved Everything is black and white!
-
Hi, I am completly new to QTQuick and trying to get a feel for things. I am contributing to a project that uses qtquick and want to fix some styling, so I thought I would do a simple app where I could test things out first. But the simple app doesn't appear to accept any of the colors I am applying everything is just shades of grey.
Any suggestions?
Thanks,
Paulimport QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 import QtQuick.Controls.Styles 1.4 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") ColumnLayout{ spacing :2 Label{ text: qsTr("Hi") color:"#ff0000" } ComboBox{ model:["Hi","hello"] ComboBoxStyle{ textColor: "#ff0000" selectedTextColor: "#0000ff" background: { color:"#00ff00" } } } } }
-
Hi @BuxtonPaul and welcome
I tested your example,
the Label (text)color is changed correctly to red however for my 5.12.4 Qt version I get reference errors for the ComboBoxStyle which will result in no color changes.
To you have them too?
-
QtQuick.Controls.Styles
can be applied only toQtQuick.Controls 1
(which are deprecated btw), while you are usingQtQuick.Controls 2.2
.