<div style="text-align: left;"><span style="font-family: courier new,monospace;">Hello, I have strong .NET background with C# and want to do some familiar things from it with Python, but don't know how. For example, I created form in qt designer with QCalendarWidget, translated it into Python module and want to overload virtual method paintCell of QCalendarWidget. In C# I can write following (abstract) code:</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace; color: rgb(0, 0, 102);">this.calendar.PaintCell += new PaintEventHandler(myPaintCellHandler);</span><br style="font-family: courier new,monospace; color: rgb(0, 0, 102);">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace; color: rgb(0, 0, 102);">void myPaintCellHandler(object sender, PaintEventArgs e) {</span><br style="font-family: courier new,monospace; color: rgb(0, 0, 102);">

<span style="font-family: courier new,monospace; color: rgb(0, 0, 102);">    // some work here</span><br style="font-family: courier new,monospace; color: rgb(0, 0, 102);"><span style="font-family: courier new,monospace; color: rgb(0, 0, 102);">}</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">I can't find how I can do similar thing in Python without inheriting QCalendarWidget and overloading this method in inherited class (it's long and I must create additional class). So, I need to run my code whenever paintCell is called by Qt internals and </span><span style="font-family: courier new,monospace;">I have no enough experience with Python for it</span><span style="font-family: courier new,monospace;">. Please, give me some advice, I know Python must be good enough to do such things.</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--<br>Best regards, Alex Gusarov</span><br style="font-family: courier new,monospace;"></div>