Results 1 to 2 of 2

Thread: selectAll in QSpinBox when clicked

  1. #1
    Join Date
    Dec 2013
    Location
    Jerada, Morroco
    Posts
    106
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    11

    Default selectAll in QSpinBox when clicked

    Hi all,

    I Wondered if there is a method to select the text in the spinBox when we click in line edit in the spinBox , i tried to overlide mousePressEvent but it works just when we click in the buttons up an down.
    Have any body an idea to do this ?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: selectAll in QSpinBox when clicked

    If you subclass QSpinBox you can also set your own QLineEdit subclass or install an event filter on the existing one.

    Cheers,
    _

Similar Threads

  1. selectAll in QLineEdit does not work
    By Ishmael in forum Newbie
    Replies: 4
    Last Post: 25th May 2015, 06:26
  2. QSpinBox
    By ToddAtWSU in forum Qt Programming
    Replies: 10
    Last Post: 1st September 2012, 04:36
  3. Replies: 8
    Last Post: 19th August 2010, 13:18
  4. QLineEdit selectAll() in eventFilter
    By mclark in forum Qt Programming
    Replies: 6
    Last Post: 1st February 2008, 09:13
  5. SelectAll causes freeze
    By Khal Drogo in forum Qt Programming
    Replies: 20
    Last Post: 4th December 2007, 19:26

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
  •  
Qt is a trademark of The Qt Company.