PDA

View Full Version : QTreeView DrawTree example pleaze



mamyte03@gmail.com
17th September 2007, 08:36
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?

jpn
17th September 2007, 09:34
Could you elaborate the problem? Most likely you don't need or want to reimplement QTreeView::drawTree() but to implement a custom delegate (http://doc.trolltech.com/latest/model-view-delegate.html).

mamyte03@gmail.com
17th September 2007, 09:43
I have a searchWidget, where search is in QTreeView . And I need print all it . Where are a lot of colums and rows

jpn
17th September 2007, 09:47
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 (http://doc.trolltech.com/latest/model-view-model.html) which you set to the view.

mamyte03@gmail.com
17th September 2007, 13:09
I mean printing something with a printer

jpn
17th September 2007, 14:03
How about opening a QPainter on QPrinter, and using QWidget::render()?