Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2652

QDoubleSpinBox.setValue does not accept integers >= 2**63

    XMLWordPrintable

Details

    • a0f1df961 (dev), f4f3e5f34 (dev), e6cf34a69 (6.7), 38d240f6f (6.7), 355dd5fd0 (6.6), 63f55c549 (6.6), e6138255b (tqtc/lts-6.5), cf837365c (tqtc/lts-6.5), e3e75d375 (tqtc/lts-6.2)

    Description

      QDoubleSpinBox.setValue (and setMaximum, ...) do not accept integer values exceeding 2**63 - 1. floats of the same value are accepted.
       

      from PySide6.QtWidgets import QApplication, QDoubleSpinBox
      
      app = QApplication()
      box = QDoubleSpinBox()
      
      value = 2**63 - 1
      # Works fine
      box.setValue(value)
      box.setMaximum(value)
      
      value = 2**63
       # Workaround:
      box.setValue(float(value))
      box.setMaximum(float(value))
      
      # OverflowError: int too big to convert
      box.setValue(value)
      box.setMaximum(value)
      

      This is very similar to https://bugreports.qt.io/browse/PYSIDE-2417.

      Attachments

        1. pyside2652_pyqt.py
          0.7 kB
        2. pyside2652_stack.txt
          26 kB
        3. pyside2652.py
          0.7 kB

        Issue Links

          For Gerrit Dashboard: PYSIDE-2652
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              bers bers bers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: