Question

I'm grabbing a window handle with the following code:

HWND hwnd = FindWindow(L"QWidget", NULL);

and it returns a HWND to a QWidget (I checked with Spy++, the handles match). But after this, if I try the following:

QWidget* widget = QWidget::find(hwnd);

or

QWidget* widget = QWidget::find((WId)hwnd);

widget is always 0. Does anyone know why? Am I using QWidget::find() correctly?

Thanks,

Dave

Was it helpful?

Solution

solved: was compiling in debug, so QtGui4d.dll was loaded instead of QtGui4.dll

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top