Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Reserve screen-space or preventing window overlapping
Forum Updated to NodeBB v4.3 + New Features

Reserve screen-space or preventing window overlapping

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 4.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jesuisbenjamin
    wrote on last edited by
    #1

    Hi, thanks for taking interest in this thread.

    I've been looking for a while on the Internet and i haven't found so far how to prevent window overlapping or reserve space for a window using Qt4. The idea is to be able to make a desktop panel/dock application, much like gnome-panel or docky, cairo-dock. I have found "how to do this with Gtk on StackOverflow":http://stackoverflow.com/questions/3859045/preventing-window-overlap-in-gtk

    Please note i am using PySide or PyQt on a Linux platform (Ubuntu).

    I'd really appreciate your help.

    Benjamin

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      This is really a function of the window manager. Take a look at kwin, it already offers much of this functionality.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jesuisbenjamin
        wrote on last edited by
        #3

        OK -- isn't Kwin KDE-specific? Shouldn't the program i build communicate to the X Window System the GUI needs reserved space? That's what is done using Gtk (see example above). Or did i misunderstand your suggestion?
        Thanks.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          X11 does not specify policy, so almost everything is client specific... There are some agreements on how to interpret stuff, but each client is free to ignore those.

          Having said that: The _NET_WM_STRUT seems to be pretty universally accepted (and is even part of a freedesktop.org specification). I am sure you can find examples of how to use it from Qt by asking the search engine of your choice.

          That approach is of course X11 specific. I am not aware of a way to set what you need in a cross-platform way though.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jesuisbenjamin
            wrote on last edited by
            #5

            Thanks. The application i am making is intended for Linux only. I intend to use the _NET_WM_STRUT_PARTIAL as in my Gtk example. But i am not sure as to change the window properties. All i have found is that some of the Window properties as defined by "standards.freedesktop.org":http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html, such as NET_WM_WINDOW_TYPE* can be "set with flags":http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt.html#WindowType-enum . But i have no idea as to how the _NET_WM_STRUT or _NET_WM_STRUT_PARTIAL can be implemented. There seems to be no flag for this.
            Is there any way to set X window client properties with Qt? I've not been lucky with Google.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jesuisbenjamin
              wrote on last edited by
              #6

              Hi,

              I didn't get any luck with my researches. Any idea anyone?

              Thanks

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved