1

I'm working on a GUI application with Qt on Linux. The operating system only provides the X Server and the prerequisites to run a Qt application. There is no desktop environment like GNOME, KDE, etc. installed yet. There's no window manager neither.

So my question is: does Qt require a preinstalled window manager (like KWin, Compiz, Metacity, etc.) or is it possible to write a Qt application that communicates with the X Server directly? I'm aware of the fact that the latter one possibly drives me crazy due to the effort I'd have. However, due to limitation of resources it could be an option.

Thanks in advance for your help!

baumgarb
  • 1,955
  • 3
  • 19
  • 30
  • 4
    The X server is enough, you do not need anything else. Source : that is exactly what I have beside my desk right now. Actually you can also do without a X server if you have an embedded Qt (it can directly use the framebuffer) – dydil Nov 18 '16 at 09:52
  • 3
    WM is not required. Keep in mind that WM is typically for managing multiple windows systems and also the availability of window decorations. This means you will have a very basic management only (best for full-screen applications) – Sebastian Lange Nov 18 '16 at 10:01
  • First of all thanks for the fast replies! So I don't need any window manager. And where is the starting point to develop such an application? Or is there any difference in programming such an GUI application with Qt between having a WM and not having a WM? The Qt documentation is quite huge and I can't figure out how I would write such an application without having a window manager. – baumgarb Nov 18 '16 at 10:02
  • 1
    Development is the same as for every other ui-application. The window manager just adds extra behaviour options. The content of your application would be not affected at all, only resize-options, widget-moving options and similar stuff. – Sebastian Lange Nov 18 '16 at 10:22
  • 1
    Check out the *nodm* "window manager", I think most popular Linux distros have a package for it. It starts X11 without actual Window Manager, so depending on your platform, you can use it directly or just see what is in it. – hyde Nov 18 '16 at 18:59

1 Answers1

3

No, Qt doesn't require a window manager when running under X11. You will have to manage your own windows, though! That means that you'll have to manage the Z order of windows, dragging windows on the screen, minimization/maximization if you need such, etc.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313