ScreenShot with Qt using Rocky Linux 9
Unsolved
General and Desktop
-
wrote on 3 Apr 2023, 14:53 last edited by
Hi all,
I have an application on Linux.
I make a screenshot as follows :QScreen *screen = QGuiApplication::primaryScreen(); QPixmap pixmap = screen->grabWindow(0); bool result = pixmap.save("sc,"PNG");
This works correctly when I use CentOS-7 but when using Rocky Linux 9, I have a black screenshot.
Is there anyway to resolve this problem ?Thanks in advance !
-
Hi all,
I have an application on Linux.
I make a screenshot as follows :QScreen *screen = QGuiApplication::primaryScreen(); QPixmap pixmap = screen->grabWindow(0); bool result = pixmap.save("sc,"PNG");
This works correctly when I use CentOS-7 but when using Rocky Linux 9, I have a black screenshot.
Is there anyway to resolve this problem ?Thanks in advance !
Hi and welcome to devnet,
Which desktop environment are you using ?
With which window manager ?
1/2