Results 1 to 4 of 4

Thread: Printing from QtQuick.Controls

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Printing from QtQuick.Controls

    Yes, there is no print dialog yet for QtQuick.Controls.

    For now you have to call a method or slot on an exposed C++ object and let it handle the widget based dialog.

    Not sure why you would want to render controls onto a printer though, you wouldn't do that with widget's either.

    Cheers,
    _

  2. #2
    Join Date
    Apr 2011
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Printing from QtQuick.Controls

    Well I would like to print some hires QtQuick output to a printer, because QtQuick can do some nice rendering in an easy way. QtWebkit has gone away (Qt-5.6) and QWebengine is all asynchronous, so you never know, when the rendering is finished (only the DOM loading, which happens some undefined time before the rendering finishes).

    Rendering QtQuick at a custom resolution into something invisible, which can render itself into a QPainter or can give me a QImage would be great!

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Printing from QtQuick.Controls

    You could try using a QQuickWidget to load the scene and using its render() method to draw into a painter.
    Or QQuickWindow::grabWindow() to get an image of the window's content.
    Or QQuickWindow::setRenderTarget() to render into a frame buffer object and converting that to an image.

    Cheers,
    _

Similar Threads

  1. Replies: 3
    Last Post: 6th March 2014, 10:09
  2. MenuBar QML QtQuick.Controls 1.0
    By TheIndependentAquarius in forum Qt Quick
    Replies: 2
    Last Post: 24th December 2013, 11:12
  3. Replies: 0
    Last Post: 29th April 2013, 11:47
  4. QtQuick 2.1
    By shadowroot in forum Qt Quick
    Replies: 1
    Last Post: 6th April 2013, 08:44
  5. Hiding controls changes spacing of other controls
    By MrGarbage in forum Qt Programming
    Replies: 1
    Last Post: 18th December 2007, 20:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.