Results 1 to 3 of 3

Thread: QSpinBox: Pressing 'Backspace' wont set it to 'Zero'

  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    33
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSpinBox: Pressing 'Backspace' wont set it to 'Zero'

    I have a dialog with several QSpinBox elements in it.

    You enter a value, then select it later and press backspace[or 'delete'], it wont be set to '0'. The old value will remain there.

    Is it the default behavior of QSpinBox? How can I make it revert to zero on 'backspace/delete' key press? Someone please guide me.

    Thanks in advance

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    33
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSpinBox: Pressing 'Backspace' wont set it to 'Zero'

    Hi all,
    Were someone able to figure this out?
    I am using Qt 4.2.2 from Windows and Linux
    In both platforms, the behaviour is same only.
    Dont you think, from the users point of view, its is required that pressing backspace should erase the values?

    Someone got any workarounds for this issue? Any kind of help will be highly appreciated.
    Thanks
    Last edited by deepakn; 8th October 2008 at 11:02. Reason: updated contents

  3. #3
    Join Date
    Jul 2006
    Location
    Atlanta, GA
    Posts
    86
    Thanks
    26
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSpinBox: Pressing 'Backspace' wont set it to 'Zero'

    You would probably have to capture the key event and set it to what you want for the spinbox
    fnmblot
    --------------------------------------
    Gee Ricky, I'm sorry your mom blew up.

Similar Threads

  1. Replies: 3
    Last Post: 22nd August 2008, 08:46
  2. QSpinBox with checkbox
    By :db:sStrong in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2007, 14:22

Tags for this Thread

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.