Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt in Education
  4. PyQt QDoubleSpinBox by default displayable and settable decimal

PyQt QDoubleSpinBox by default displayable and settable decimal

Scheduled Pinned Locked Moved Unsolved Qt in Education
2 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VladStudent
    wrote on last edited by
    #1

    Is it possible to set QDoubleSpinBox so that by default, displayed decimals are only one decimal place (example : 1.0), but if you edit the value manually it can be set up to five decimal places (example :1.03456)?

    I found only QDoubleSpinBox.setDecimals which sets both the displayed and editable decimal places to the same setting.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You will likely be interested in textFromValue from your subclass.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved