Results 1 to 5 of 5

Thread: selectAll in QLineEdit does not work

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: selectAll in QLineEdit does not work

    Hi, in case someone comes across this thread, this solution worked for me:

    Qt Code:
    1. void MyCustomSpinBox::focusInEvent(QFocusEvent *event)
    2. {
    3. QTimer::singleShot(0, [this](){
    4. selectAll();
    5. });
    6. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to Michal Fapso for this useful post:

    Kryzon (30th September 2015)

Similar Threads

  1. Replies: 2
    Last Post: 13th December 2009, 20:27
  2. QLineEdit
    By rick_st3 in forum Newbie
    Replies: 1
    Last Post: 14th June 2008, 09:05
  3. QLineEdit selectAll() in eventFilter
    By mclark in forum Qt Programming
    Replies: 6
    Last Post: 1st February 2008, 08:13
  4. Replies: 3
    Last Post: 15th January 2008, 12:11
  5. SelectAll causes freeze
    By Khal Drogo in forum Qt Programming
    Replies: 20
    Last Post: 4th December 2007, 18:26

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