Results 1 to 9 of 9

Thread: QKeyEvent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post QKeyEvent

    hi,
    If my QLineEdit text length is 0 and if i press enter.Then a message has to be dispayed.
    I tried the below code.Its not working.
    Whats wrong with the code??



    Qt Code:
    1. QKeyEvent keyy(QEvent::FocusIn,0,Qt::KeypadModifier,"0",false,1);
    2.  
    3. if((Varname->text().length()==0) && (keyy.key() == Qt::Key_Enter))
    4. {
    5. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 22nd February 2008 at 09:59. Reason: missing [code] tags

Similar Threads

  1. what's mean of the member of QKeyEvent
    By sunote in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2007, 21:25
  2. QKeyEvent questions
    By bglidden in forum Qt Programming
    Replies: 1
    Last Post: 3rd October 2006, 06:29
  3. Posting a QKeyEvent to a QLineEdit
    By cocheci in forum Qt Programming
    Replies: 14
    Last Post: 5th June 2006, 14:54

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.