From 174c5ca19fa464889c5c8570195289640c35d84b Mon Sep 17 00:00:00 2001 From: liranbg Date: Fri, 24 Oct 2014 03:20:16 +0300 Subject: [PATCH 1/2] fix table view --- main/CalendarTab/CalendarManager.h | 2 ++ .../Calendar/coursesSchedule/calendarSchedule.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/main/CalendarTab/CalendarManager.h b/main/CalendarTab/CalendarManager.h index f835f65..b8d0e94 100644 --- a/main/CalendarTab/CalendarManager.h +++ b/main/CalendarTab/CalendarManager.h @@ -23,7 +23,9 @@ public: ~CalendarManager() { delete caliSchedPtr; + delete examSchePtr; delete caliDialog; + delete examDialogPtr; } void exportCalendarCSV(); void setCalendar(QString html); diff --git a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp index 99afda7..4a50607 100644 --- a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp +++ b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp @@ -47,8 +47,8 @@ void calendarSchedule::clearTableItems() for (j = 0; j < columnCount(); j++) if (this->takeItem(i,j) != NULL) delete this->takeItem(i,j); - horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); - verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); +// horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); +// verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); } void calendarSchedule::insertCourseIntoTable() @@ -94,8 +94,11 @@ void calendarSchedule::insertCourseIntoTable() verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); } - horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); - verticalHeader()->setSectionResizeMode(QHeaderView::Interactive); +// horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); +// verticalHeader()->setSectionResizeMode(QHeaderView::Interactive); + horizontalHeader()->stretchLastSection(); + verticalHeader()->stretchLastSection(); + } From dbbf562a0e557e4860e443f6bb786e0080123758 Mon Sep 17 00:00:00 2001 From: liranbg Date: Fri, 24 Oct 2014 03:36:28 +0300 Subject: [PATCH 2/2] remove 's' that prevented to compile --- src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp index 2839034..ab89187 100644 --- a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp +++ b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp @@ -47,7 +47,7 @@ void calendarSchedule::clearTableItems() for (i = 0; i < rowCount(); i++) for (j = 0; j < columnCount(); j++) if (this->takeItem(i,j) != NULL) - delete this->takeItem(i,j);s + delete this->takeItem(i,j); this->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); this->resizeRowsToContents(); }