Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: How to start the log file when key combinations pressed??

  1. #21
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to start the log file when key combinations pressed??

    Yes but your dialog needs to accept focus to receive key events. How many times do I have to say it for you to understand?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #22
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to start the log file when key combinations pressed??

    How to make the dialogs to accept the focus??

  3. #23
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to start the log file when key combinations pressed??

    Go to QWidget API and keep reading it until you find something that might indicate that it's related to focus.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #24
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default How to capture the key press events in QT in windows7??

    How to capture the key press events in QT in windows7?? CTRL+ALT+ some alphabet combination's. if we press this combination.. the particular event function should be called...

  5. #25
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to capture the key press events in QT in windows7??

    If you have a GUI application you can use QShortcut or QAction.
    A camel can go 14 days without drink,
    I can't!!!

  6. #26
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to capture the key press events in QT in windows7??

    I have used the following code.. it works fine in xp(Qt 1.3.1) but it is not working in windows 7.,(Qt 4.3)::

    Qt Code:
    1. QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+M"), this);
    2. QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(showmessage()));
    To copy to clipboard, switch view to plain text mode 

  7. #27
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to capture the key press events in QT in windows7??

    For the last time: shortcuts, key events and such work in terms of focus. One of children of the window containing the shortcut needs to have focus for the shortcut to trigger.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 16th September 2011, 02:10
  2. Replies: 6
    Last Post: 4th October 2010, 03:19
  3. Capture key & key combinations from keyboard
    By aikidorb in forum Qt Programming
    Replies: 3
    Last Post: 5th June 2010, 13:13
  4. Start a exe file with parameters
    By raphaelf in forum Qt Programming
    Replies: 11
    Last Post: 17th June 2008, 09:11
  5. Getting the row for button pressed
    By steg90 in forum Qt Programming
    Replies: 2
    Last Post: 28th November 2007, 15:45

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.