Qt Code:
QTreeView w; w.setModel(&model); swatch1->setWidget(&w); w.setEnabled(true);To copy to clipboard, switch view to plain text mode
If this is your actual code, then the QTreeView instance you are creating on the stack will be destroyed as soon as the method exits, and it will be removed from the dock widget.
Bookmarks