I have experienced strange phenomenon from one day.
This was a simple source that worked well in the past.
But now it does not work.
QPushButton *test; test = new QPushButton; qDebug() << "!test =" <<!test; qDebug() << "!test =" <<!test;
result : !test = false !test = false
I want " !test = true " result...
Is it my fault?
So what should I do?
Thanks in advance for your advice.
This declaration is array of pointers. These two pointers are not initialised with anything. So you don't know what will get initialised. It will have some random value. !<randomvalue> will be always false.
So result is as per your code.