Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

how to redraw certain items of a Calendar or just the selected one?



  • Hi,
    I'm using the old Qt Quick Controls 1 - Calendar Example
    I've added a listener on long press that opens a Menu where several action should trigger a refresh of the selected date.
    How can I manage that? I've access to calendar.selectedDate but how how to force the redraw of only this delegate? Any tricks to achieve it?

    I've seen there is the non deprecated CalendarModel in Qt.labs.calendar that is using MonthGrid as delegate but I guess I'd have the same issue...
    I could connect to MonthGrid::clicked(date date) but then how to force the repaint of the corresponding delegate only?



  • well I suppose it is not possible...
    I'm redrawing all the items (delegates).
    As an update() is not doing the job, I'm using a "fake" binding like suggested here.


Log in to reply