1
votes

I'm starting to learn QML.

I found here that there is the 'size' type in QML. But when I'm trying to use it:

property size buttonSize: "75x30"

I get the error:

Button.qml:13:14: Expected property type 
         property size buttonSize: "75x30" 
                  ^ 

Why?

1

1 Answers

3
votes

size is not directly supported as a property type.

The supported types are listed here.
You can also use a variant to store the size:

property variant buttonSize: Qt.size(75,30)