Fixed layout.removeRow for old versions of Qt
This commit is contained in:
parent
27cdd98cb7
commit
f179c01210
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user