Results 1 to 3 of 3

Thread: Query other client's window geometry, e.g. Qt equivalent of XQueryTree

  1. #1
    Join Date
    Apr 2006
    Posts
    2
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Query other client's window geometry, e.g. Qt equivalent of XQueryTree

    Hi folks,

    I'm working on some Free Software programs that do interesting screen tricks (think xroach, xsnow, xneko, amor, stuff like that). I'm using Qt, but don't want a KDE dependency. I would like it to be portable to all Qt platforms if possible.

    Is there any way, using just Qt, to query the geometry of other client's windows? Basically, I need to be able to find out the current state of the screen, i.e. where all windows are located, their size, their stacking order (if possible), and so forth.

    Since this is Free Software, I'm primarily concerned with X11, but I would prefer to do this in a portable manner just using Qt, so I'm looking for e.g. at Qt equivalent of XQueryTree.

    Looking at some Qt programs that do similar things (e.g. some KDE programs like amor) but so far all I've seen is programs falling back to native X11 calls. Is this really the only way?

    Anyway, if you can help, that would be excellent!

  2. #2
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Query other client's window geometry, e.g. Qt equivalent of XQueryTree

    Yes, this is the only way. Qt cannot help you with this.
    Save yourself some pain. Learn C++ before learning Qt.

  3. The following user says thank you to Chicken Blood Machine for this useful post:

    wjl (23rd April 2006)

  4. #3
    Join Date
    Apr 2006
    Posts
    2
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Query other client's window geometry, e.g. Qt equivalent of XQueryTree

    Quote Originally Posted by Chicken Blood Machine
    Yes, this is the only way. Qt cannot help you with this.
    That's what I had concluded, but I figured it couldn't hurt to ask in case I'd missed something. =)

    Anyway, thanks for the confirmation!

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.