I'm trying to build a program via Qt4, which was written on Qt5. My UI form have QPlainTextEdit
and I receive following errors:
'class QPlainTextEdit' has no member named 'setSizeAdjustPolicy'; did you mean 'setSizePolicy'?
pteNewAddr->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
^~~~~~~~~~~~~~~~~~~
setSizePolicy
'AdjustToContentsOnFirstShow' is not a member of 'QAbstractScrollArea'
pteNewAddr->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
I understand it is due to setSizeAdjustPolicy
was not introduced in Qt4, but Qt4 is my target now, not Qt5.
Still, in QtCreator designer for a QPlainTextEdit
I have a field SizeAdjustPolicy
and ui_*.h
keep regenerating with:
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
How can I solve this error?