Unsolved Button styles for newer buttons?
-
I am reworking some code to use newer versions of QML libraries. I noticed that style is gone. Do I just use the style as a base object now?
Assuming AButtonStyle.qml file:
AButtonStyle{ specific stuff here }
Instead of:
Button { style: AButtonStyle{ } }
-
No, that is not going to work. I will need to redo the buttons.
-
Use
QtQuick.Templates
to customize controls for Controls 2.x. -
@intruderexcluder It looks interesting, but I don't see how that replaces styles. For my issue I just did this:
SpecialButton.qml
Button { // custom things here that are common to all buttons // properties and stuff }
Instead of using styles.
-
There is no more styles in controls2, they are much better and more lightweight. To see how to customize, for example, buttons you can use docs, or you can see how templates customized by default.
-
Like everyone said there is no more styles in cotrols2 but you can find most of the previous properties of "styles" directly into button (or any other item previously using styles), and if not there is a new equivalent.