How to create a custom calender widget

From Qt Wiki
Revision as of 15:43, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

English Български

Customizing the appearance of QCalendarWidget

There are numerous ways to make a calendar. And the simplest one , must be using the QCalendarWidget [qt.io]. However, we have limited control over the appearance of this widget.

Inheriting the QCalendarWidget [qt.io] can solve the issue. Here is the example class which explains a ‘custom’ calendar widget.

The cells, or the particular days are customized, and in order to do this , we need to take control over the protected function paintCell [qt.io]

Example:

That is all. Happy coding.

Categories: