--- a/QTfrontend/ui/widget/frameTeam.cpp Wed May 02 21:45:55 2012 +0200
+++ b/QTfrontend/ui/widget/frameTeam.cpp Thu May 03 01:18:29 2012 +0200
@@ -41,6 +41,7 @@
availableColors.push_back(QColor(colors[i++]));
resetColors();
+ this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
}
void FrameTeams::setInteractivity(bool interactive)
@@ -89,6 +90,8 @@
mainLayout.removeWidget(it.value());
it.value()->deleteLater();
teamToWidget.erase(it);
+ QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size());
+ QCoreApplication::postEvent(parentWidget(), pevent);
}
void FrameTeams::resetTeams()
@@ -99,6 +102,8 @@
it.value()->deleteLater();
teamToWidget.erase(it++);
}
+ QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size());
+ QCoreApplication::postEvent(parentWidget(), pevent);
}
void FrameTeams::setHHNum(const HWTeam& team)
@@ -132,3 +137,8 @@
{
emit teamColorChanged(team);
}
+
+QSize FrameTeams::sizeHint() const
+{
+ return QSize(-1, teamToWidget.size() * 39 + 9);
+}