Results 1 to 2 of 2

Thread: Copy and print in QDialog

  1. #1
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Copy and print in QDialog

    I created a QDialog which contains a QTreeView and copy and print QToolbar Button.

    How can i copy and print the Qtreeview content on clicking respective button.
    print function is only there for editor or document how can i do for a dialog.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Copy and print in QDialog

    It doesn't matter whether you are in a dialog or not. There is no out-of-the-box printing support for tree-views. You need to open a painter on the printer object and paint all the items of your treeview to the painter. Alternatively you can render the looks of the widget using QWidget::render() but that's probably not what you want.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 6th May 2009, 08:08

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.