[PyQt] check box controlers - tree View problem

purest2 rupertathorpe at hotmail.com
Fri Dec 28 11:45:55 GMT 2007


Hi there,

i wrote a program using pyqt3 a while ago, which allowed users to select
files for deleting. the program showed a simplifyed view of part of the
filesystem as a tree, user could 'check' any node of the tree which would
cause all child nodes to be checked as well.

This was handled automatically by pyqt3, simply by defineing all the check
boxes as 'checkbox controlers'.


I am now trying to write a similar program, however the systems people have
upgraded us to PYQT4.

all the old classes are listed as out-of-date, so i am using the new stuff.
i am using a treeView and the nodes are QStandardItems. it is easy enough to
make them checkable:
       
        void setCheckable ( bool checkable )

but I cant see any way of making them automatically controll the child
nodes, and i dont see how i can write it myself as i cant even find a signal
to tell me the state has changed.

if anyone can give me hints as to the best way to do this i will be very
happy.

-- 
View this message in context: http://www.nabble.com/check-box-controlers---tree-View-problem-tp14454370p14454370.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list