Important: Please read the Qt Code of Conduct -

Use Qt c++ to create a toolbar in linux?

  • I want to create something like polybar which is a status bar for linux. Is there a way to create an application that sticks to one side of the screen and changes the space that other programs take up? What I mean by that is for example the browser does not go over the status bar on windows 7, 8 and 10 since the status bar tells me vital information, such as time, date and what tabs I have open. Covering that app (the status bar) is not wanted.

  • @adamsmith
    I don't know so take my comment with a pinch of salt. I would have thought it's easy to create the "bar" bit as a Qt app. But changing the behaviour of the host desktop, so that its geometry, behaviour or whatever is altered, will require going outside the app to do something to the native desktop. At minimum windowing-specific code. And for "Linux" that I would ahve thought would depend on what window/desktop manager the user is running, can you at least limit yourself to one variant like GNOME or whatever? The KDE desktop might be easiest because it's written in or integrates with Qt, doesn't it?

  • I'd like it to run on as many desktop environments as possible, so if anybody knows for example how to integrate that geometry change in any DE such as gnome, i3, bspwn, KDE, etc. I'd be happy to hear about it or be redirected to the place where I can learn about it.

  • Lifetime Qt Champion


    From a really quick look, it seems that polybar uses low level X11 protocol. Based on your goal you might want to take a look KDE's Latte project.

    Qt integrates with these desktop environment so if you want to go deeper and provide a replacement for their bar, you should contact the developers of these projects.

Log in to reply