Results 1 to 4 of 4

Thread: problem with spinbox control ?

  1. #1
    Join Date
    Mar 2006
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default problem with spinbox control ?

    How to add float values as the step size in spinbox ....


    I want to increment the step value at a rate of 0.1,0.2, ......

  2. #2
    Join Date
    Jan 2006
    Location
    La Spezia,Italy
    Posts
    77
    Thanks
    9
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with spinbox control ?

    Hi,from Qt documentation:
    QSpinBox is designed to handle integers and discrete sets of values (e.g., month names); use QDoubleSpinBox for floating point values.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem with spinbox control ?

    With Qt3 you can use wwFloatSpinBox from wwWidgets.

  4. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem with spinbox control ?

    For Qt4, there is already a QDoubleSpinBox that works nicely.

    For Qt3, the above class works. I also created a FixedSpinBox class for my QBrew program (on my website). I also seem to recall one on the free download page at Trolltech.

Similar Threads

  1. activeWindow control problem
    By batileon in forum Newbie
    Replies: 3
    Last Post: 17th October 2008, 07:44
  2. LineEdit / SpinBox focus in problem
    By Sethest in forum Qt Programming
    Replies: 3
    Last Post: 17th September 2008, 13:06
  3. start the mysql service and run commands
    By cbarmpar in forum Qt Programming
    Replies: 17
    Last Post: 14th September 2008, 23:08
  4. Problem with SpinBox signals and slots
    By ramstormrage in forum Newbie
    Replies: 4
    Last Post: 2nd May 2008, 01:45
  5. Replies: 6
    Last Post: 3rd February 2006, 09:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.