Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why are my full screen screenshots always not the latest
Forum Updated to NodeBB v4.3 + New Features

Why are my full screen screenshots always not the latest

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 5 Posters 494 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • houyaweiH Offline
    houyaweiH Offline
    houyawei
    wrote on last edited by
    #1
    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
    833b967d-7fd6-4ae8-9587-2d6a0536c781-image.png 1dfa7f4b-31d7-4767-a776-a1351afabf58-image.png

    Pl45m4P 1 Reply Last reply
    0
    • houyaweiH houyawei
      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
      833b967d-7fd6-4ae8-9587-2d6a0536c781-image.png 1dfa7f4b-31d7-4767-a776-a1351afabf58-image.png

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @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?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • houyaweiH Offline
        houyaweiH Offline
        houyawei
        wrote on last edited by
        #3

        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

        https://youtu.be/K4nKFjx0tgo

        E C 2 Replies Last reply
        0
        • houyaweiH houyawei

          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

          https://youtu.be/K4nKFjx0tgo

          E Offline
          E Offline
          Eastonhan
          wrote on last edited by
          #4

          @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

          https://youtu.be/K4nKFjx0tgo

          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?

          JoeCFDJ 1 Reply Last reply
          0
          • houyaweiH houyawei

            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

            https://youtu.be/K4nKFjx0tgo

            C Offline
            C Offline
            ChrisW67
            wrote on last edited by
            #5

            @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.

            https://youtu.be/K4nKFjx0tgo

            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.

            1 Reply Last reply
            0
            • E Eastonhan

              @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

              https://youtu.be/K4nKFjx0tgo

              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?

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #6

              @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.

              houyaweiH 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @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.

                houyaweiH Offline
                houyaweiH Offline
                houyawei
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0
                • houyaweiH Offline
                  houyaweiH Offline
                  houyawei
                  wrote on last edited by
                  #8

                  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,[=]{
                  ......................................
                  });
                  
                  1 Reply Last reply
                  0
                  • houyaweiH houyawei has marked this topic as solved on

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved