From f179c012108cdc31edaf198f8944f4cd5bfab214 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 6 Jun 2019 10:13:46 -0400 Subject: [PATCH] Fixed layout.removeRow for old versions of Qt --- logqso.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/logqso.cpp b/logqso.cpp index 7d18197..073a3d3 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -124,9 +124,18 @@ void LogQSO::resetAdditionalFields(){ auto layout = static_cast(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(); }