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



  • 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


  • Qt Champions 2017

    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.



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.