Fixed combo boxes in the property view resizing when you modify them and screwing up vertical alignment
This commit is contained in:
parent
87bf3dbfcc
commit
220c54004f
|
@ -190,6 +190,8 @@ QWidget* CPropertyDelegate::createEditor(QWidget *pParent, const QStyleOptionVie
|
||||||
if (pOut)
|
if (pOut)
|
||||||
{
|
{
|
||||||
pOut->setFocusPolicy(Qt::StrongFocus);
|
pOut->setFocusPolicy(Qt::StrongFocus);
|
||||||
|
QSize Size = mpModel->data(rkIndex, Qt::SizeHintRole).toSize();
|
||||||
|
pOut->setFixedHeight(Size.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
return pOut;
|
return pOut;
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
void SetPropertyModel(CPropertyModel *pModel);
|
void SetPropertyModel(CPropertyModel *pModel);
|
||||||
void SetEditor(CWorldEditor *pEditor);
|
void SetEditor(CWorldEditor *pEditor);
|
||||||
|
|
||||||
virtual QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& rkOption, const QModelIndex &rkIndex) const;
|
virtual QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const;
|
||||||
virtual void setEditorData(QWidget *pEditor, const QModelIndex &rkIndex) const;
|
virtual void setEditorData(QWidget *pEditor, const QModelIndex &rkIndex) const;
|
||||||
virtual void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &rkIndex) const;
|
virtual void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &rkIndex) const;
|
||||||
bool eventFilter(QObject *pObject, QEvent *pEvent);
|
bool eventFilter(QObject *pObject, QEvent *pEvent);
|
||||||
|
|
Loading…
Reference in New Issue