Hello,
I hope I can make this clear. I am making my own calendar / reminder.
I use a QTableView and a QStandardItemModel for this. The table also has a delegate and in the delegate a paint event.
The model is constructed like model = new QStandardItemModel(6, 7, this);
So it has empty items. The display of the days is done in the paint event which gets a QDate for the left upper day and from there on it displays all the numbers in the calendar.
This works well for the first time but when I try to display the next month with update(), nothing happens, the paint event does not get called.
So I do something like:
Qt Code:
void nextMonth() { calculatenextmonthupperleftday(); update(); }To copy to clipboard, switch view to plain text mode
I think this approach should be possible, how can I generate that paint event anew?
Thanks.
Bookmarks