[PyQt] selectionChanged or currentChanged in QTreeView

danny shevitz at lanl.gov
Wed Oct 6 23:40:28 BST 2010


> Are you sure, that the activated signal doesn't fit your needs?

Unfortunately, yes. I forgot to mention, that I have the activated signal
connected to a slot that shows when it fires. I also have both selectionChanged
and currentChanged overridden to show when they execute.

My app constructs a tree by drag and drop. When I drop a node, I immediately
make that node current and edit it's text. The execution order seems to
selectionChanged, then currentChanged. The activated signal never fires  at all. 
FWIW, in opposition to what you say, selectionChanged and currentChanged always
seem to fire together. I have not yet seen a case where only one fires.

At this point, I'm not sure what the activated signal does. The only time in my
app I can get it to fire is if I drop a node, enter the editor and then hit
return. I certainly doesn't fire if I just click on a different node.

D






More information about the PyQt mailing list