Qt/Qml Quick Control 2: SpinBox value without number format -


i want display numbers in qml quick controls 2 spinbox without number formatting:

spinbox {     inputmethodhints: qt.imhdigitsonly     from: 1000     to: 10000 } 

i tried set different locales everytime number displayed "1.000" or "1,000" (correct "1000"). there way force unformatted output?

you can override textfromvalue function:

import qtquick 2.8 import qtquick.controls 2.1  applicationwindow {     width: 400     height: 300     visible: true      spinbox {         inputmethodhints: qt.imhdigitsonly         from: 1000         to: 10000          textfromvalue: function(value) {             return value;         }     } } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -