[PyQt] QDockwidget advice needed
shevitz at lanl.gov
Wed Aug 18 17:39:31 BST 2010
This is a newbie question. I want to implement the standard paradigm of a
QTreeView as the central widget in a QMainWindow, and a QDockWidget that
shows details about the selected item in the tree. I can get the QTreeView
to work just fine, and I can set up the gui in the QDockWidget just fine.
The question is: what is the standard way to change the contents of the
dock widget when I change the selected item in the tree.
My guess is to connect to QTreeView.activated, but what next? From within
my QTreeView.activated handler do I implement a refresh function that changes
all the widget values in the dock widget? Is there a slicker way.
Also, if I want the dockwidget to act in a live modeless manner, and have
the changes propagate between the dock widget and the tree, is there a
standard paradigm for doing this?
More information about the PyQt