What actually do you mean?
In designer genearated files i never see something like that![]()
What actually do you mean?
In designer genearated files i never see something like that![]()
a life without programming is like an empty bottle![]()
Well in designer you don't actually have the
MyObj *obj;
it is written at the public member Object explorer.
Now, generally before using the object we need to create a instance for it..I am asking can we use the object without creating its instance in a signal slot connection ..and what may its consequences be.
Humans make mistake because there is really NO patch for HUMAN STUPIDITY
This will crash.Qt Code:
MyObj *obj; connect(obj,SIGNAL(),this,SLOT());To copy to clipboard, switch view to plain text mode
You are passing an uninitialized pointer to connect(). If you're lucky obj is initialized with 0 and connect() checks for 0-pointers, but generally accessing an uninitialized object is simply shooting yourself in the foot.
Bookmarks