I need a QWindow to capture screenChanged signal in object A.
I have QWidget B that has Qt::Window flag.
B is a parent of A.
After object of class A was created I am trying to call connect like this:
bool isOk = connect(b->window()->windowHandle(), SIGNAL(screenChanged(...)), a, SLOT(...)));
assert(isOk);
I am getting an error that tells:
QObject::connect: Cannot connect (null)::screenChanged(QScreen*) to CFloatingEdit::onScreenChanged()
Why b->window()->windowHandle() is zero?
Am I trying to make with screenChanged the right way?