PDA

View Full Version : How to print QTreeView



mamyte03@gmail.com
20th September 2007, 09:09
Hello. I have a problem by printing QTreeView. Can someone make me example ? My treeView put in attachments. How can I do it? How count columns/?

ghorwin
20th September 2007, 12:46
What is exactly the problem? For the column count, and other inquiries use the model that is supplying the view with data. In this case,

treeView->model()->columnCount();

That is, if your items are all top level items. For items further down in the hierarchy you need to pass the model index of that parent as argument for columnCount().

Good luck!