Results 1 to 4 of 4

Thread: QAction shortcuts from QLineEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: QAction shortcuts from QLineEdit

    Like Disco STU I like disco music...

    You can try following solutions

    a) Check in each QAction-slot-function if QLineEdit has the focus and break execution if true

    b) Write your own event handler for QFocusEvent. gotFocus(): disable the signals, lostFocus(): enable it again.


    Lykurg

  2. #2
    Join Date
    Mar 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Default Re: QAction shortcuts from QLineEdit

    Quote Originally Posted by Lykurg View Post
    Like Disco STU I like disco music...

    You can try following solutions

    a) Check in each QAction-slot-function if QLineEdit has the focus and break execution if true

    b) Write your own event handler for QFocusEvent. gotFocus(): disable the signals, lostFocus(): enable it again.


    Lykurg
    Thanks, but i don't want the action to be disabled, just the shortcut. It seems that the only way you can disable the shortcut is to set it to empty string. So does this mean that everytime QLineEdit get's focus I have to loop through all my QActions and set their shorcuts to "" ?

    btw, I am using fullmetalcoder's qshortcutmanager

Similar Threads

  1. Replies: 1
    Last Post: 26th November 2006, 09:32
  2. Creatin Key Pad shortcuts
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 19th May 2006, 05:50
  3. Replies: 1
    Last Post: 18th March 2006, 16:37
  4. Menu shortcuts in Visual Studio?
    By kw in forum Qt Programming
    Replies: 1
    Last Post: 16th March 2006, 23:30
  5. a box around QLineEdit?
    By GreyGeek in forum Qt Tools
    Replies: 13
    Last Post: 8th February 2006, 15:40

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.