I create custom form and user interface components with Qt Designer and use Qt's integrated build tool uic, to generate code for them when the application is built. The generated code contains the form's user interface object.
I have QDockWidget with QDateEdit, I want to paint cells of some date:
I want to do something like this:
date_to = self.dockwidget.findChild(QDateEdit, "date_to")
painter = QPainter()
painter.fillRect(QRect(25, 25, 25, 25), Qt.red)
date_to.calendarWidget().paintCell(painter, QRect(25, 25, 25, 25), QDate(2018, 8, 2))
How to use paintCell in this case
Virtual function:
def paintCell (painter, rect, date)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.