mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
QT5 -- Enable build on 4.8.4 -OR- 5.2.0
New strategy to enable build on QT5 or QT4.8 is quite simple to enact as most of the fixes for QT5 can be applied to earlier releases. This patch fixes up some of the special cases for QT5 so they will continue to build on earlier releases.
This commit is contained in:
@@ -65,8 +65,13 @@ DiaryWindow::DiaryWindow(Context *context) :
|
||||
monthlyView = new QTableView(this);
|
||||
monthlyView->setItemDelegate(new GcCalendarDelegate);
|
||||
monthlyView->setModel(calendarModel);
|
||||
#if QT_VERSION > 0x050000
|
||||
monthlyView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
monthlyView->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
#else
|
||||
monthlyView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||
monthlyView->verticalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||
#endif
|
||||
monthlyView->verticalHeader()->hide();
|
||||
monthlyView->viewport()->installEventFilter(this);
|
||||
monthlyView->setGridStyle(Qt::DotLine);
|
||||
|
||||
Reference in New Issue
Block a user