通过QPlatformIntegration *platformIntegration来创建。
创建windows窗口过程:
qtbase\src\plugins\platforms\windows\qwindowsglcontext.cpp
HWND QWindowsContext::createDummyWindow(const QString &classNameIn,
const wchar_t *windowName,
WNDPROC wndProc, DWORD style)
{
if (!wndProc)
wndProc = DefWindowProc;
QString className = registerWindowClass(classNameIn, wndProc);
return CreateWindowEx(0, reinterpret_cast<LPCWSTR>(className.utf16()),
windowName, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
HWND_MESSAGE, NULL, static_cast<HINSTANCE>(GetModuleHandle(0)), NULL);
}