qcalendarwidget

Highlight date interval in a Qt5 Calendar Widget

谁说胖子不能爱 提交于 2021-01-29 00:32:18
问题 I want to highlight every day in a CalendarWidget that is between a selected start and end date. My problem is that a CalendarWidget only allows SingleSelection in QTCreator but says that other things can be changed programmatically though. I found some hints to use a QPainter and the paintCell() Method but i till dont know where to begin. The Internet wasn't helpful in my case. I tried to change a single date first on buttonClick but even this didnt work, can you give me an advice how to use

Adding items to a QTableView within QCalendarWidget

让人想犯罪 __ 提交于 2020-01-30 09:15:06
问题 I'm currently making a to-do application which has a calendar. Whenever the user has an event on a specific date, A red circle appears in the top left corner. Whenever the user double clicks on the date, I want it to display a new window with information on event for the day. However, I am having trouble storing information into each date. How can I make it so each date has a sort of list that can store events? Here is the UI: Here is the code for the subclassed QCalendarWidget: class