The Qt 5.15 Disaster On Multi-Monitor Setups

From LinuxReviews
Jump to navigationJump to search
Qt.svg

Linux distributions have begun rolling out Qt 5.15 and it is a total disaster for everyone using a multi-screen setup on Linux, Windows or macOS. Qt 5.15 breaks every single Qt and KDE application with a toolbar with a button that brings up a multi-choice menu if the application running on a system with more than one display connected and the application is not on the far-left display.

written by 林慧 (Wai Lin) 2020-08-28 - last edited 2020-09-19. © CC BY

Kemonomimi rabbit.svg
Update: Qt 5.15.1 does not have this Qt 5.15.0 problem.

Kdenlive-qt-5.15-ok.jpg
What should happen when you click the render button in kdenlive: Two options appear right below the toolbar buttons position.

A whole lot of free software use the Qt toolkit to create their graphical user-interfaces. Qt version 5.15.0 has a bug which affects everyone running any Qt application on a multi-monitor system. Expandable toolbar buttons are always drawn on the far-left monitor regardless of where the application is if it is linked against Qt 5.15.0.

This bug is present on GNU/Linux, macOS and Windows 10 computers with Qt 5.15.

Kdenlive-qt-5.15-fail.jpg
How all Qt and KDE applications linked against Qt 5.15 behave on GNU/Linux under multi-monitor X setups.

This rather odd bug manifests itself regardless of what desktop or window manager is used as long as the application is running on the X display server with more than one monitor. It seems that Qt insists on drawing toolbar pop-out options on the far-left monitor while the rest of the application is drawn where it should be.

Even the most basic Qt applications you can write will have this flaw:

#include <QApplication>
#include <QMenu>
#include <QToolButton>

int main(int argc, char **argv) {
  QApplication app(argc, argv);
  auto button = new QToolButton();
  button->setText("button");
  button->setPopupMode(QToolButton::InstantPopup);
  QMenu *menu = new QMenu(button);
  menu->addAction("item");
  button->setMenu(menu);
  button->show();
  return app . exec();
}

Qt applications do behave correctly if they happen to be on the far-left monitor on a multi-monitor setup, they only break if they are on the middle or far-right monitor. Which display is set as "primary" does not matter.

Qt-design-studio-1.6.0-beta.jpg
The Qt Company's own Qt Design Studio version 1.6.0 on a multi-monitor system with Qt 5.15. It does not respect the system theme (unlike every other Qt program) and the toolbar/button behavior is, of course, broken in the same way all other Qt programs are when they are linked against Qt 5.15.

The Qt Company, who makes the Qt toolkit, is aware of the Qt 5.15 bug that breaks all Qt and KDE applications. They do not seem to care, not even a little, since GNU/Linux users tend to use the free GNU GPL edition of their dual-licensed toolkit. They are much more concerned with those using the commercially licensed version under Windows and, to some degree, macOS. This is why it is so unfortunate that many within the Qt Company would very much like to restrict Qt releases to paying customers for 12 months after they are released: Linux users could end up having to deal with bugs like this one for years due to the combination of the Qt Company's lack of willingness to address GNU/Linux specific bugs and their desire to restrict bug-fixes to paying customers for a whole year after they are fixed in their internal source tree.

"The fact that they want to burn the field and still think they can harvest come spring is to me ridiculous and seems to be done by someone who has no understanding of the process of work involved in their own project on the technical or social level."

Transmission-qt-qt5.15.jpg
Transmission-qt linked against Qt 5.15.

GNU/Linux users can "solve" this particular bug by not upgrading to Qt 5.15. Earlier Qt versions, like Qt 5.14.2, do not have this problem. That solution may be less feasible as more and more "bleeding edge" GNU/Linux distributions make Qt 5.15 the only version available in their repositories. The only good news for those with a multi-monitor setup is that those using long term support (LTS) distributions, like Ubuntu 20.04 LTS, will not suddenly find that all Qt and KDE applications are broken because Qt happened to be "upgraded" to 5.15 during a regular system update.

You should make sure to actually look at the packages your distribution package manager wants to update when you refresh your system and make sure Qt 5.15 is not on that list if you are using a fast-moving distribution and you are using a multi-screen display because you will have a bad experience if you end up with the disaster that is Qt 5.15.

0.00
(0 votes)


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.