m_backend(new BackendKicker(this)),
m_datamodel(new MatchDayModel(this, m_backend)),
m_scoretbl(new ScoreTable(m_datamodel)),
- m_settingsdlg(new SettingsDialog(this)),
+ m_settingsdlg(new SettingsDialog()),
m_settings(qApp->organizationName(), qApp->applicationName())
{
QFont f;
palette.setColor(QPalette::Background, QColor(0, 0, 0, 127));
palette.setColor(QPalette::Foreground, QColor(255, 255, 255, 127));
m_statuslbl.setPalette(palette);
- m_statuslbl.setAttribute(Qt::WA_TransparentForMouseEvents);
m_statuslbl.setAutoFillBackground(true);
m_statuslbl.setBackgroundRole(QPalette::Background);
m_statuslbl.setAlignment(Qt::AlignCenter);
+ m_statuslbl.setGeometry(0, 0, 400, 200);
m_statuslbl.setFont(f);
// table
this->setModel(model);
// behaviour
- this->setAttribute(Qt::WA_TransparentForMouseEvents);
this->setSelectionMode(QAbstractItemView::NoSelection);
// style
QSize ScoreTable::sizeHint() const
{
QSize s;
+ int maxrows = 9;
for (int i = 0; i < horizontalHeader()->count(); i++) {
s.setWidth(s.width() + horizontalHeader()->sectionSize(i));
}
- // add missing few pixels (from borders mabye?)
- // TODO: find better solution!
- s.setWidth(s.width());
- for (int i = 0; i < verticalHeader()->count(); i++) {
+
+ for (int i = 0; i < verticalHeader()->count(), i < maxrows; i++) {
s.setHeight(s.height() + verticalHeader()->sectionSize(i));
}
// add missing few pixels (from borders mabye?)
{
// this will recalculate section sizes
QTableView::dataChanged(topLeft, bottomRight);
-
- this->updateGeometry();
}
<x>0</x>
<y>0</y>
<width>400</width>
- <height>79</height>
+ <height>85</height>
</rect>
</property>
<property name="windowTitle">
<string>Choose League</string>
</property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="rbBL1">