Results 1 to 2 of 2

Thread: How to add a Hot Key to a Qt Project?

  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Cool How to add a Hot Key to a Qt Project?

    I want when somebody press Ctrl+Q the application to close... So how can i do this?

    I now the command
    qApp->quit();

    But i do not know how to add the hotkey..
    Attached Images Attached Images

  2. #2
    Join Date
    Apr 2007
    Posts
    76
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to add a Hot Key to a Qt Project?

    override the QWidget::keyPressEvent(QKeyEvent * event) of the widget you are using.

Similar Threads

  1. How to add a gif to a Qt Project?
    By Bong.Da.City in forum Newbie
    Replies: 5
    Last Post: 6th September 2010, 21:51
  2. cannot run the project
    By kazal in forum Qwt
    Replies: 0
    Last Post: 24th May 2010, 08:18
  3. Replies: 1
    Last Post: 3rd December 2009, 23:34
  4. Qt Project How to ?
    By sunil.thaha in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 10:56
  5. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 09:43

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.