Results 1 to 2 of 2

Thread: How to use QCloseEvent to change QLineEdit

  1. #1
    Join Date
    Aug 2012
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to use QCloseEvent to change QLineEdit

    Hello Guys,
    got small problem with my project. Maybe somone knows how can I solve it.

    I have the following situation:
    Got QObject of my virtual keybord. This object have function void SetLineEdit(QLineEdit *line);

    How to run this function every time when user will change focus on QLineObject (mouse action or tab button or new window start) ?

    I found QFocusEvent but how to get from it pointer to the right object ?

    Thanks in advance for any kind of tip.

  2. #2
    Join Date
    Jun 2013
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to use QCloseEvent to change QLineEdit

    You could install an event filter on the QlineEdit using QObject::installEventFilter and check for the corresponding event as explained in the documentation.

Similar Threads

  1. QLineedit's text orientation change
    By vivek.panchal in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2013, 13:56
  2. Replies: 1
    Last Post: 17th August 2010, 16:17
  3. Replies: 5
    Last Post: 6th September 2009, 16:32
  4. Change QLabel to QLineEdit when mousePressEvent happens
    By naoyamakino in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2009, 18:37

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.