Results 1 to 6 of 6

Thread: how can I get the QApplication handle by process ID in QT2

  1. #1

    Question how can I get the QApplication handle by process ID in QT2

    I want to get main window handle by process id, So first I must get the QApp handle, what can I do?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can I get the QApplication handle by process ID in QT2

    What operating system do you use?

  3. #3

    Default Re: how can I get the QApplication handle by process ID in QT2

    linux, do you have some idea?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can I get the QApplication handle by process ID in QT2

    Quote Originally Posted by pencilren View Post
    linux, do you have some idea?
    Well, it's not that easy. You can't simply access some object in another process. It would have to be allocated in shared memory segment, that you can map. Better try some IPC mechanism, like DBUS.

  5. #5
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can I get the QApplication handle by process ID in QT2

    I am wondering how the Test tools like squish does it ?
    We can't solve problems by using the same kind of thinking we used when we created them

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can I get the QApplication handle by process ID in QT2

    Quote Originally Posted by sunil.thaha View Post
    I am wondering how the Test tools like squish does it ?
    I've never had a chance to use Squish, but I think it might use LD_PRELOAD to inject a library that intercepts calls to Qt. Other possibility is to attach to the application like a debugger. Anyway these aren't normal ways of interprocess communication.

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.