level 2
SDL2.0,用createwindow能显示窗口,用createWindowFrom(窗口winID)就没有显示了。请问怎样才能把SDL2的窗口嵌入QT控件?
2017年06月02日 01点06分
1
level 1
void* winID = (void*)pUi->VideoWidget->winId();
SDL_Window* pWindow = SDL_CreateWindowFrom(winID);
2017年07月19日 08点07分
3
level 1
同样遇到该问题,QT 5.12 + SDL 2.0.10,屏幕不显示。
window = SDL_CreateWindowFrom(reinterpret_cast<void*>(winId()));
if(window == NULL)
throw "Can't create window: " + std::string(SDL_GetError());
2019年08月19日 02点08分
5
level 1
1、setUpdatesEnabled(false);
2、把所有SDL相关操作放到子线程,包括上面的SDL_CreateWindowFrom
2019年08月27日 15点08分
6