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. Set resolution of screenshot image of 3D rendering

Set resolution of screenshot image of 3D rendering

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

    Hi All,

    I have developed a Qt application which can render 3D files.
    One of its features is an option to take screenshots of the current state of the 3D rendering.

    Here is the code snippet,

    // Set capture entity
    view->setCaptureEntity(sceneRoot);
    
    // Save the rendering by calling this method
    void My3DQtViewer::saveImage(QString filename)
    {
        m_screenshotfilename = filename;
        m_renderCaptureReply = m_renderCapture->requestCapture();
        connect(m_renderCaptureReply, SIGNAL(completed()), this, SLOT(saveImageToFile()));
    }
    
    // Save image to file
    void My3DQtViewer::saveImageToFile()
    {
        m_renderCaptureReply->saveImage(m_screenshotfilename);
    }
    

    The code works fine and I am able to take screenshots perfectly.
    Is there any way I can control the resolution/quality of the image being saved?

    If I can present the user with options to change the resolution of the output image, how will I incorporate this in the code?

    Thanks

    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