Answer the question
In order to leave comments, you need to log in
How to replace x11Info when switching to qt5?
Good afternoon. In one open source project, the assembly with the QT backend in the master version was completely broken.
The project is barely glimmering and there is no need to wait for outside help.
Decided to fix it myself. But I had almost nothing to do with C++ and QT and I can't figure out how to fix this construction:
XRRScreenConfiguration *config = XRRGetScreenInfo(QX11Info::display(), RootWindow(QX11Info::display(), x11Info().screen()));
Answer the question
In order to leave comments, you need to log in
Probably so:
or you can do it like this:
XRRScreenConfiguration *config = XRRGetScreenInfo( QX11Info::display(), QX11Info::appRootWindow() );
In general, you can replace it with QDesktopWidget , but you will have to somehow get away from using the Display class, the object pointer of which is returned by the display() method. You need to figure out what the XRRGetScreenInfo function is, and how it uses this Display. Perhaps the primaryScreen property will be enough to get the main screen number and the screenGeometry(int screen) method .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question