How to use Designer to implement a nested widget?
I have been coding very simple qt applications, without using Qt creator and Qt Designer. Now I want to simplify the procedure because I know sooner or later the application will be much more complicated.
However, I met a very frequent requirement, which is to nest widgets in other widgets. For example, I want to nest a QComboBox in a Qtreewidget. A plain code maybe using "setItemWidget" but in Designer it seems impossible to drag a widget into another one.
Do I miss some hidden functions to get this normal requirement?
A plain code maybe using "setItemWidget"
What you need is a
QStyledItemeDelegatesubclass that pains as a
QComboBoxand then call
setItemDelegateForColumnto assign it to a QTreeWidget.
Since a delegate is not a widget you won't be able to set it drag-drop in designer