ModelView programing with Delegate in qt
When I create QSpinBox in createEditor() of QStyleItemDelegate class,It displays in side the cell of the QTableview.
But when I create QDialog in that function,It gets display out side(seperatly).What could be the reason?
A dialog is a windows type and not embeddable as a widget.
You can just use QWidget as base class and it will work.
Since you want to put it inside the cell, QDialog is not the right base class.
@mrjj yeah thanks..I will try it using QWidgets.
Its just 2 place to change in code then its Qwidget.
No reason to recreate it all again. very easy to switch.
class mine : public QDialog <<< the actual base
and in .cpp
mine::mine(QWidget *parent) : QDialog(parent), << change the call to base for constructor
maybe #include <QWidgets> instead of QDialog
there is also
after you construct the dialog.
It might do the same. not tested. though.