How to use ComboBoxStyle
-
i tried these:
ComboBoxStyle.background: "#223"
and these:
ComboBoxStyle: { background = "#223"; }
But i still get:
Non-existent attached object
@chawila
properties starting with a capital letter are attached properties. Which is of course wrong for your case.
Try this:ComboBox { style: ComboBoxStyle { .... } }
-
Thanks for replying @raven-worx
But how do i add property inside that?.
eg background.
i tried these:
style: ComboBoxStyle { background: { background = "red" } }
and
i tried these:
style: ComboBoxStyle { background : "red" }
do not loose patience i`m new to these
-
Thanks for replying @raven-worx
But how do i add property inside that?.
eg background.
i tried these:
style: ComboBoxStyle { background: { background = "red" } }
and
i tried these:
style: ComboBoxStyle { background : "red" }
do not loose patience i`m new to these
@chawila
syntactically the second approach is way more correct than the first one.
But see the ComboBoxStyle docs. The background property is of type Component (not of type color).style: ComboBoxStyle { background: Rectangle { color: "red" } }
-
Hi,
Like this : (not very nice style but functionnal : ) )import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4ComboBox { anchors.centerIn:parent width: 200 style: ComboBoxStyle { background : Rectangle{ //here u can set what u want anchors.fill: parent color : "grey" border.width:1 } }
}
LA
-
Hi,
Like this : (not very nice style but functionnal : ) )import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4ComboBox { anchors.centerIn:parent width: 200 style: ComboBoxStyle { background : Rectangle{ //here u can set what u want anchors.fill: parent color : "grey" border.width:1 } }
}
LA