Results 1 to 2 of 2

Thread: How can I use QX11Info to make a custom dock bar. (like KDE)

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How can I use QX11Info to make a custom dock bar. (like KDE)

    Hello,
    I am programming on RHEL 6, using C++ and QT. I have created a custom dock bar with my own start button on the left and a clock on the right. My dock bar is created with a QWidget control.

    So I have the basic application running. What I need to do now is figure out how to identify which applications are open so I can put some icons in the dock bar. And identify which one is active so I can make it's icon a "focus' icon. I also may need to know when an app is minimized.

    Can someone please tell me a simple way of doing this? It seems to me that I should be able to get that info when my dock bar launches from the QX11Info class. Then I think I should be able to set up some type of event listener to capture "focus" events from the windows.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How can I use QX11Info to make a custom dock bar. (like KDE)

    QX11Info tells you about the X11 environment that your application is running in. It tells you nothing about the processes running on the system and which, if any, have visible windows. AFAIK there are no Qt supplied methods to identify processes running on the system or to interrogate for other objects managed by the window manager. For this you will need to revert to native APIs. On Linux you may be able to get process information from the /proc file system, or by parsing the output of a well-crafted 'ps' command.

Similar Threads

  1. How to make Custom Combobox ?
    By qt_man in forum Newbie
    Replies: 4
    Last Post: 15th February 2012, 05:01
  2. Make Dock Widgets overlap main view
    By genjix in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2010, 14:16
  3. How to make a custom qwidget clickable ?
    By ada10 in forum Newbie
    Replies: 2
    Last Post: 1st September 2010, 12:55
  4. forcing dock windows to dock?
    By eric_vi in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2009, 15:32
  5. Custom action added to make by qmake
    By NTwoO in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 10:17

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.