Unsolved Calling __init__() in QObject subclasses
-
@Denni-0
It's a very simple question. Nothing to do with slots, connections, potential issues,super
, 3 issues, or anything else. Not to do with what one might or might not consider better style. There are no "underlying wrapper that has been created by someone else".Without answering about anything else, are you saying
class DerivedClass(BaseClass): def __init__(self): BaseClass.__init__(self)
behaves differently from
class DerivedClass(BaseClass): pass
? I'd like to know. If so, could you provide a reference so I can read up. Thanks.
-
@Denni-0 said in 'PySide2.QtCore.Signal' object has no attribute 'emit':
troll question
I never ask "troll" questions. Life is too short.
In my example I don't particularly intend
BaseClass
to be derived fromQObject
, else I would have stated that explicitly. Though it could be, if that makes any difference to the answer.I have since looked around and seen much code (both Qt and non-Qt) which does indeed not bother to declare an explicit
__init__()
constructor in a derived class if it does not need to do anything other than class the base class constructor. At the moment from reading around I am happy that the default behaviour of a derived class with no explicit__init__()
, which is to call base class__init__()
automatically, suffices. Unless you have a reference to the contrary? -
@Denni-0 said in 'PySide2.QtCore.Signal' object has no attribute 'emit':
BTW if you had come to me respectfully with your question I would have been more than happy to have explained this to you in that manner but you chose to be basically disrespectful in your approach
because you simply cannot comprehend the basic coding principles of Object Oriented programming let alone Function Oriented programming and I would suggest you go back to linear coding as you will cause a lot less harm with your programs.
OK, if that's how you feel and speak let's call it a day. Nobody other than you speaks to people like this in this forum.
-
@Denni-0
I have been careful to be polite in everything I have ever posted in response to you, always saying you have your opinions and others have theirs. You are just rude and abusive. Nobody other than you accuses others of lying, trolling, or the endless stream of insults you throw in your responses. I guess in all my career I have never come across anyone like you in a professional or technical environment. I still remember the first post I saw from you where you announced that @Pablo-J-Rogina was a "troll" and you would have him banned. It's a shame you are allowed to do so.We have nothing more to say to each other.
-
@JonB said in Calling __init__() in QObject subclasses:
I guess in all my career I have never come across anyone like you in a professional or technical environment.
I have. I suppose you've just occupied a less hostile time and place in the universe.
I still remember the first post I saw from you where you announced that @Pablo-J-Rogina was a "troll" and you would have him banned.
Heh, that's actually rather funny.
It's a shame you are allowed to do so.
Personally, I'm very lenient, less personally - willfully treading on thin ice is going to get you into the freezing water, sooner or later.
-
@kshegunov said in Calling __init__() in QObject subclasses:
get you into the freezing water
it is beneficial for your health
-
@LeLev said in Calling __init__() in QObject subclasses:
it is beneficial for your health
Ordinarily I'd agree, but the deadly sniffles is afoot, so I'd advise against it.
-
@JonB said in Calling __init__() in QObject subclasses:
I don't understand what you mean by "make sure that the
__init__
of the QObject is called". I do not define anydef __init__(self)
method of myclass someClass(QObject)
, and it works fine. Just deriving fromQObject
(or from any class) calls its__init__()
automatically.While I don't have experience with PySide, I read @KeirRice's comment as saying: "IF you implement a custom
__init__()
method, THEN remember to explicitly call the base implementation of__init__()
."Does that sound right to you?
@kshegunov said in Calling __init__() in QObject subclasses:
the deadly sniffles
That's the first time I've heard it called that. It's a disturbingly cute name.
-
@Denni-0 said in Calling __init__() in QObject subclasses:
@kshegunov the interesting thing I found is that JonB did not feel he was doing anything impolite as he feels every unrelated completely off topic manipulative comment he has made was simply him being polite.
What he feels or doesn't feel is beside the point. He asked an acceptable question, and even if you think it may've been manipulative, well sorry, you're just gonna have to eat it.
Which is ironic because that by nature is not a polite thing to do however I have no problems with giving back what I am given which is to say try to bully me and I get right in your grill
I don't grill. I have a very thick skin that's been growing thicker by merit of my living in eastern Europe. I don't care about political correctness, nor do I employ it, nor do I agree with it. I call it as I see it, if you don't like that then I suggest refraining from talking to me. Don't try to test the patience of the moderators group, we are decent enough bunch and allow a lot of freedom, but that doesn't mean disruptive aggressive behaviour is going to be tolerated for too long a time. This is not a discussion, mind you, I'm telling you how things are.
I am currently trying to find out what their definition of trolling is.
Trying to hijack the technical discussion on multiple occasions by arguing moderators' decisions is one form of trolling. Everyone is entitled to their opinion, but that doesn't mean everyone else is entitled to listening to their opinion, like with the "entitled" tone in the second part of your post. If you think this is some kind of a democracy where your opinion of what's trolling weighs more than say @SGaist's, then I must assure you you're sorely mistaken. Blatantly disrespectful tone and going around telling everybody you're smart and they're dumb doesn't fly well, neither in earning respect, nor in soliciting support for your point.
-
@Denni-0 said in Calling __init__() in QObject subclasses:
Yeah and your post was highly technical and spot on the original topic which is Calling init() in QObject subclasses --- NOT Best not to point fingers when you are extremely guilty yourself. Further its an extreme exaggeration "on multiple occasions?" or your math is really bad
Are we arguing? I told you already, this is not a discussion.
-
@Denni-0
Since we are talking facts.
Im the most friendly mod here and frankly, you are the first troll-like person i have seen here.I understand you feel deeply about__INIT__ but you resort to name-calling and aggressive behavior
and insist that our long term users are trolling.So can you please dial it down a notch?
-
@Denni-0 said in Calling __init__() in QObject subclasses:
okay so you have ended this thread then?
Yes, metaphorically and literally.
Also I am assuming by your statements that you have made earlier that you have moderator power otherwise you would not be so abusive yourself?
When you assume ... and you know the rest. I've openly said already I am a moderator.