Hi,
I have noticed some unusual behaviour in using the 'decimals' keyword for the spinboxes. I have some input values with a lot of digits, so I want to show all of them (let's say 8 digits). Passing along the decimals=8 keyword argument to a spinbox does not seem to display this amount of digits. Am I missing something about this keyword?
The code in the included file (shown below in text as well; not sure if Google screws up the formatting) shows a simple example. I try to show the value 123456789.987654321 in the spinbox, with decimals=10 as an option. Running this code displays 1.234567e+08 as a value, which is not exactly 10 digits, let alone 10 decimals.
Put another way: is there something I can pass along to make the spinbox show all the significant digits?
Kind regards,
Wouter Gins
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
class Test(object):
def __init__(self):
super(Test, self).__init__()
self.mainWin = QtGui.QMainWindow()
self.mainWin.setWindowTitle('Test')
self.spinbox = pg.SpinBox(value=123456789.987654321, decimals=10)
self.mainWin.setCentralWidget(self.spinbox)
def show(self):
self.mainWin.show()
if __name__ == '__main__':
import sys
Simple = Test()
Simple.show()
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
QtGui.QApplication.instance().exec_()