weepdoo
6th June 2007, 17:19
Hye,
I'm actually developping an application in PyQt, with Qt4.1 and python 2.4
I have done my own QAbstractItemModel class (here 'M'), for managing my data (a tree like structure).
I've got already a QTreeView (here called 'S') connected to this model and it work great.
But, I would like that when a user click an element (or an index if you prefer here call 'I')of my tree:
display a new window (here is 'C')in my workspace (easy)
this window have a widget whitch is a treeview like item (just a treeview would be the best (I'm a bit lazy :P))
the model for the view should be 'M' (such as for 'S') BUT i do not want to display the parent (and siblings) of 'I', just his children
I try to make a 'picture':
The Tree in 'S':
[A]
|-[H]
|-[I]
| |-[K]
| |-[L]
...
The quiet same tree in 'C':
[I]
|-[K]
|-[L]
...
Does anyone know how can I do this ?
I'm actually developping an application in PyQt, with Qt4.1 and python 2.4
I have done my own QAbstractItemModel class (here 'M'), for managing my data (a tree like structure).
I've got already a QTreeView (here called 'S') connected to this model and it work great.
But, I would like that when a user click an element (or an index if you prefer here call 'I')of my tree:
display a new window (here is 'C')in my workspace (easy)
this window have a widget whitch is a treeview like item (just a treeview would be the best (I'm a bit lazy :P))
the model for the view should be 'M' (such as for 'S') BUT i do not want to display the parent (and siblings) of 'I', just his children
I try to make a 'picture':
The Tree in 'S':
[A]
|-[H]
|-[I]
| |-[K]
| |-[L]
...
The quiet same tree in 'C':
[I]
|-[K]
|-[L]
...
Does anyone know how can I do this ?