Results 1 to 4 of 4

Thread: KeyEvent propagation to Desktop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KeyEvent propagation to Desktop

    Quote Originally Posted by ^NyAw^ View Post
    Is there a way to make a QAction to emit a KeyEvent that the Desktop(Windows or X) will catch it?
    No, at least not using Qt.

    If you are running KDE, you might switch the desktop from within your application by using dcop.

  2. #2
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: KeyEvent propagation to Desktop

    hi,
    Under windows you can use PostMessage() from winApi to desktop window(QDesktopWidget::winId()) with WM_KEYUP/WM_KEYDOWN messages.

    It's a bit OS hacking, but it's only possible way i know...
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: KeyEvent propagation to Desktop

    Hi,

    Thanks, will try it.
    Òscar Llarch i Galán

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.