Results 1 to 2 of 2

Thread: Help needed re: clipboard detection

  1. #1
    Join Date
    Feb 2007
    Posts
    27
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Help needed re: clipboard detection

    I'd like to have my application inspect the clipboard whenever a particular widget's window is brought forward when that widget is visible, whether through switching within my application or switching from another application. Is there any signal (or several signals) I can connect to in order to get this type of event?

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

    Default Re: Help needed re: clipboard detection

    The easiest way to implement would be to have a timer that would query QApplication::activeWindow() or similar every second or so and act if the widget changes.

    Another thing worth trying is to intercept change events of the application (have a look at the QEvent::Type enum), maybe one of the events is what you seek...

    Or you could dive into platform API and do it properly...

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.