Fixed layout.removeRow for old versions of Qt

This commit is contained in:
Jordan Sherer 2019-06-06 10:13:46 -04:00
parent 27cdd98cb7
commit f179c01210

View File

@ -124,9 +124,18 @@ void LogQSO::resetAdditionalFields(){
auto layout = static_cast<QFormLayout*>(ui->additionalFields->layout());
layout->removeItem(ui->field_button_layout);
#if QT_VERSION >= 0x050800
for(int i = 0, count = layout->rowCount(); i < count; i++){
layout->removeRow(0);
}
#else
QLayoutItem *child;
while((child = layout->takeAt(0)) != 0){
delete child;
}
#endif
layout->addItem(ui->field_button_layout);
m_additionalFieldsControls.clear();
}