Results 1 to 6 of 6

Thread: QTreeView DrawTree example pleaze

  1. #1
    Join Date
    Sep 2007
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTreeView DrawTree example pleaze

    Hello. I need a QTreeView , DrawTree function example. I have a QTreeView with info and I need to print it.. How can I do this?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTreeView DrawTree example pleaze

    Could you elaborate the problem? Most likely you don't need or want to reimplement QTreeView::drawTree() but to implement a custom delegate.
    J-P Nurmi

  3. #3
    Join Date
    Sep 2007
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTreeView DrawTree example pleaze

    I have a searchWidget, where search is in QTreeView . And I need print all it . Where are a lot of colums and rows

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTreeView DrawTree example pleaze

    With "printing", do you mean populating the tree view or actually printing something with a printer? If the former, you should create and fill a model which you set to the view.
    J-P Nurmi

  5. #5
    Join Date
    Sep 2007
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTreeView DrawTree example pleaze

    I mean printing something with a printer

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTreeView DrawTree example pleaze

    How about opening a QPainter on QPrinter, and using QWidget::render()?
    J-P Nurmi

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.