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. Get Screenshot on MacOS
Forum Update on Tuesday, May 27th 2025

Get Screenshot on MacOS

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 404 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.
  • UndeadBlowU Offline
    UndeadBlowU Offline
    UndeadBlow
    wrote on last edited by UndeadBlow
    #1

    Hello.
    I need to get screenshot of specific window on MaxOS.
    With Windows it looks like:

    HWND h = FindWindow(NULL, TEXT("title"));
    if (h != NULL) {
      QPixmap pix = QPixmap::grabWindow((WId)(h));
      qDebug() << pix.size();
      ui->label->setPixmap(pix);
    }
    

    But is the same task possible on MacOS?

    beeckscheB 1 Reply Last reply
    0
    • UndeadBlowU UndeadBlow

      Hello.
      I need to get screenshot of specific window on MaxOS.
      With Windows it looks like:

      HWND h = FindWindow(NULL, TEXT("title"));
      if (h != NULL) {
        QPixmap pix = QPixmap::grabWindow((WId)(h));
        qDebug() << pix.size();
        ui->label->setPixmap(pix);
      }
      

      But is the same task possible on MacOS?

      beeckscheB Offline
      beeckscheB Offline
      beecksche
      wrote on last edited by
      #2

      Hi @UndeadBlow,
      maybe this helps: http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html

      1 Reply Last reply
      0

      • Login

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