Why are my full screen screenshots always not the latest
-
QScreen *screen = QGuiApplication::primaryScreen(); screen->grabWindow(0).save("./full.jpg", "jpg");
this->grab().save(QString("few.jpg"));
I take both full screen and partial screenshots simultaneously. The interface for full screen screenshots is always the same as before, while the interface for partial screenshots is correct
-
QScreen *screen = QGuiApplication::primaryScreen(); screen->grabWindow(0).save("./full.jpg", "jpg");
this->grab().save(QString("few.jpg"));
I take both full screen and partial screenshots simultaneously. The interface for full screen screenshots is always the same as before, while the interface for partial screenshots is correct
@houyawei said in Why are my full screen screenshots always not the latest:
screen->grabWindow(0).save("./full.jpg", "jpg");
Maybe no overwrite permission in the directory for file
full.jpg
?!
Check the "last modified" date.
Is there a new file showing the same content or still the same file? -
The same goes for using the built-in screenshot in Windows 10. The first screenshot is the previous interface, and the second screenshot is the correct interfacelink text
@houyawei said in Why are my full screen screenshots always not the latest:
The same goes for using the built-in screenshot in Windows 10. The first screenshot is the previous interface, and the second screenshot is the correct interface link text
When I take partial screenshots, the interface displays correctly. It’s frustrating because I need both features to work well. Has anyone else experienced this problem or have any ideas on how to resolve it?
-
The same goes for using the built-in screenshot in Windows 10. The first screenshot is the previous interface, and the second screenshot is the correct interfacelink text
@houyawei said in Why are my full screen screenshots always not the latest:
The same goes for using the built-in screenshot in Windows 10. The first screenshot is the previous interface, and the second screenshot is the correct interface
Then the problem has nothing to do with Qt.
Your video is totally unhelpful.
Given the information presented, @Pl45m4 has already highlighted issues that may be present with regard to the files concerned. The other problem with these paths is that they are relative to the process' current working directory, which can vary over time; you may find "full.jpg" and "few.jpg" in different directories, or in multiple directories.
-
@houyawei said in Why are my full screen screenshots always not the latest:
The same goes for using the built-in screenshot in Windows 10. The first screenshot is the previous interface, and the second screenshot is the correct interface link text
When I take partial screenshots, the interface displays correctly. It’s frustrating because I need both features to work well. Has anyone else experienced this problem or have any ideas on how to resolve it?
@Eastonhan What is your Qt version? It could be an issue of Qt on Windows 10. One lazy workaround is to set window size for fullscreen with one pixel less in one direction. For example, if screen screen size is 1920 by1080. You can set fullscreen mode with 1919 by 1080. Then your problem may be gone. One pixel less does not affect much.
-
@Eastonhan What is your Qt version? It could be an issue of Qt on Windows 10. One lazy workaround is to set window size for fullscreen with one pixel less in one direction. For example, if screen screen size is 1920 by1080. You can set fullscreen mode with 1919 by 1080. Then your problem may be gone. One pixel less does not affect much.
@JoeCFD said in Why are my full screen screenshots always not the latest:
@Eastonhan What is your Qt version? It could be an issue of Qt on Windows 10. One lazy workaround is to set window size for fullscreen with one pixel less in one direction. For example, if screen screen size is 1920 by1080. You can set fullscreen mode with 1919 by 1080. Then your problem may be gone. One pixel less does not affect much.
QT5.15.2, Until now, there is still this magical problem. The QT program for screenshot on the computer I developed is not the latest, and using the built-in screenshot tool in Win10 is also not the latest. The screenshot tool in Win10 can capture other interfaces normally.
But when I use the packaged program on other Windows 10 computers, the screenshot function is completely normal, which is puzzling. -
After hiding and displaying a widget and delaying for 500ms, the screenshot results returned to normal. Suspected that the interface was refreshed
m_ndMsgBox->setVisible(true); m_ndMsgBox->setVisible(false); QTimer::singleShot(0.5 * 1000,this,[=]{ ...................................... });
-
H houyawei has marked this topic as solved on