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. take a screenshot for application runing on windows using QtScreen or anything
Forum Updated to NodeBB v4.3 + New Features

take a screenshot for application runing on windows using QtScreen or anything

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 1.3k Views 1 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.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by
    #1

    I want to take a screenshot for example to google chrome without being the current windows it may be minimized in the taskbar what I use to make a screenshot is this code

        QScreen *screen = QGuiApplication::primaryScreen();
        QPixmap pix = screen->grabWindow(0);
        ui->label->setPixmap(pix);
    

    this gets a screenshot for the current shown window I want to take a screen shot for the google chrome app running in the task manager on windows without being shown maybe it's minimized.
    what I want to finally done is to take a screenshot for the google chrome and cute some text from this image to get the current profile name that is it because I can't find anything to get this using google chrome API or something so if anyone has the solution for any of these question i appreciate this very much.
    this an image of what i want to get from google chrome
    alt text
    and my solution is to use some OCR and take a screenshot for the chrome even if it's minimized so any help please with any solution the main thing is to get google profile name in any way.
    Thanks in advance

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Im not sure Qt can directly do that. (capture minimized window)
      I think u need to use API.
      https://www.codeproject.com/Articles/20651/Capturing-Minimized-Window-A-Kid-s-Trick

      Also, what profile do you mean ?
      There is
      https://developer.chrome.com/extensions/identity
      But not sure it covers what u want.

      1 Reply Last reply
      2
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        Not helpful, just wanted to link the feature request for this to be added to the API: https://bugs.chromium.org/p/chromium/issues/detail?id=504815

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        2

        • Login

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