Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89707

PrintScreen Button or QScreen::grabWindow in WIN10 can not grab the latest QML UI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.0
    • Quick: Other
    • None
    • Win 10, Visual studio 2019 + QT
    • Windows

    Description

       it will make the bug

      • Install QT 5.15.0, Visual studio 2019
      • Install the Qt VS Tools in VS2019
      • Download attached example screen_shot_bug.zip and unzip to a folder(let's name it as screen_shot)
      • Open VS2019, Click Extentions - Qt VS Tools - Open Qt Project File(.pro)...
      • Choose  osnp.pro in screen_shot folder in the pop window, the click "open"
      • There will be a pop window show as "project file already exists...", click "Yes"
      • The solution "osnp" will loaded in the VS2019
      • Make sure the Platform Toolset is "Visual Studio 2019 (v142)" (Project - Properties - General - Platform Toolset)
      • Build and run the solution
      • There will be 3 pages in the program. In the first page(shown as page_1.png in the screen_shot_bug.zip), wait for several seconds, the page will go to next page automatically.
      • In the second page(shown as page_2.png in the screen_shot_bug.zip), click any 4 digits in the digit area(like 6666), then the page will go to next page.
      • In the third page(shown as page_2.png in the screen_shot_bug.zip), click "PrintScreen"  button in keyboard, then open “Paint” in Windows, paste(ctrl + v) the content to the Paint; or click "screenshot" button in the top right cornet in the third page(shown as page_4.png in the screen_shot_bug.zip, marked with yellow rectangle)
      • EXPECTED: In the "Paint" of Windows will show the third page; or in C:\shotScreen\XXXXXXXX(the time run the program)\ folder, there will be a png file, show the third page.
      • ACTUAL: In the "Paint" of Windows will show the first page; or in C:\shotScreen\XXXXXXXX(the time run the program)\ folder, there will be a png file, show the first page.

       

      comments:

      1. The "screenshot" button’s implementation can be found in the include\ui\shotScreen.hpp and src\ui\shotScreen.cpp
      2. In the blue step above, use alt+tab switch to another program or win+d back to desktop, and back to the screen_shot program, then the shotscreen function can be right.

      Attachments

        1. screen_shot_bug.zip
          3.44 MB
        2. screen_shot_bug.zip
          3.44 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            peterpan1983 Long Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes