Results 1 to 5 of 5

Thread: Qt4.2.2 QDoubleSpinBox QSpinBox

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Qt4.2.2 QDoubleSpinBox QSpinBox

    Hello all,
    I have a problem with QDoubleSpinBox. I need an editable spin box BUT I don't want valueChanged(double) to be emitted until I have pressed enter. How can I do it? (Is sub-classing really the only way?)

    example I have a value off 123.4 in the spin box. If I delete the three, the box emits signalChanged(12.4). The spin box controls some electronics and I can't have wild signal changes like that.

    thanks,
    K

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4.2.2 QDoubleSpinBox QSpinBox

    How about connecting to the QAbstractSpinBox::editingFinished() signal?

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Qt4.2.2 QDoubleSpinBox QSpinBox

    yes, but I'd also like to use the arrows. I'm using the valueChanged(double) to catch an arrow pressed event, but that's being triggered on a 'half edit' too.

    I need valueChanged(double) event on step up/down (with the arrows) and on editingFinished() but not during editing.

    suggestions?

    thanks
    K

  4. #4
    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: Qt4.2.2 QDoubleSpinBox QSpinBox

    Looks like you'll have to subclass after all

  5. #5
    Join Date
    Oct 2007
    Posts
    1
    Qt products
    Qt4

    Default Re: Qt4.2.2 QDoubleSpinBox QSpinBox

    Hello TheKedge,

    Sorry to bother... I know that your post regarding SPINBOX didn't have any reply since January, but I'm just wondering what was your solution / workaround of the issue.

    I have exactly the same problem as you have describe, but for me, I'm taking to one of our Optical Power Meter, so we can't just send garbage signal out.

    Anyway, any help will be greatly appreciated...

    - Sebastien

Similar Threads

  1. float value to Qspinbox
    By nErnie in forum Qt Programming
    Replies: 6
    Last Post: 17th October 2006, 08:16
  2. Problem reimplementing QSpinBox in a custom widget
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2006, 08:12

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.