Can't use int variable in button textbox
Solved
Mobile and Embedded
-
So, I'm trying to make an app in which if I push a button, the number on it will increase by one. I tried doing it by declaring a universal int variable(Num), and
onClicked: Num++;
. But I found no way to display that variable intext:
...
I don't have the faintest idea how to do it.Any help would be appreciated!
-
Thought I'd just post this as well
Button { id: button x: 110 y: 220 width: 375 height: 180 text: font.pointSize: 30 scale: 0.4 anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter onClicked: Num++; }
Also the button is from QtQuick - Controls 2.