Hide text area from SpinBox
-
wrote on 1 Oct 2021, 08:04 last edited by sonulohani89 10 Jan 2021, 08:05
Hi, I want to hide the text area from the spin box and show only the indicators. I am using SpinBox from QtQUick Controls 1. Example code:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 1.4 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") SpinBox { id: spinBox minimumValue: 37 maximumValue: 40 value: 38 stepSize: 1 } }
Is this possible?
-
wrote on 1 Oct 2021, 08:36 last edited by
Could you explain why you need the Spinbox but without numbers?, it might help us find you a solution.
-
Hi, I want to hide the text area from the spin box and show only the indicators. I am using SpinBox from QtQUick Controls 1. Example code:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 1.4 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") SpinBox { id: spinBox minimumValue: 37 maximumValue: 40 value: 38 stepSize: 1 } }
Is this possible?
wrote on 1 Oct 2021, 10:02 last edited by Bob64 10 Jan 2021, 10:03@sonulohani89 have you seen the "Customizing SpinBox" section in the documentation? I guess you could customise the
contentItem
to achieve what you want. (Though I do agree with Markkyboy that it would be useful to know what you are actually trying to achieve as this might not be the best approach.) -
@sonulohani89 have you seen the "Customizing SpinBox" section in the documentation? I guess you could customise the
contentItem
to achieve what you want. (Though I do agree with Markkyboy that it would be useful to know what you are actually trying to achieve as this might not be the best approach.)wrote on 1 Oct 2021, 10:45 last edited by sonulohani89 10 Jan 2021, 10:45@Bob64 Yeah, that documentation is helpful. Thanks. I was able to hide the text box now by using contentItem. Thanks
1/4