PyQt subclassing?

If the underlaying C++ methods are virtual, your Python methods that override them will be called any time C++ code calls them. If they are just regular methods, any C++ code will call the original C++ methods by default (Python code will call the Python methods though, because it sees the Python object and all methods are "virtual" there).

Of course that's good news in the case where you do want to override a Qt method, but bad news in the case where you don't. Would it be better, then, to delegate instead of subclass? – rwallace Dec 1 '09 at 20:33 If you don't want to override, give it a different name.

Btw, what do you mean by delegate? – Macke Dec 1 '09 at 21:02 Why not just go by PEP 8 and name all your methods with lowercase/underscores? Qt uses camelCase so you won't have any clashes... except possibly for one-word method names... – Jesse Aldridge Dec 1 '09 at 21:58 I am naming all my methods with lowercase, but there are a number of one-word method names, enough that I'm not going to remember them all, leaving aside the possibility of more being added in future versions.

By delegate I mean instead of having your class inherit a widget, have it contain a self. Widget attribute. – rwallace Dec 1 '09 at 23:47 1 If you want it to act as a widget, you have to subclass the QWidget, so you have the same problem.

There is really no way around it. Really, just give you methods different names, make them more specific, etc.– LukáÅ¡ Lalinský Dec 1 '097 at 8:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions