1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 11:42:04 +00:00

DOCS/client_api_examples: qtexample: set a magic Qt flag

Otherwise, other magic Qt stuff can be magically broken.

(No, I don't know the real reasons for this.)
This commit is contained in:
wm4 2014-10-16 21:19:30 +02:00
parent b836a2295c
commit 63f103e05d

View File

@ -59,6 +59,7 @@ MainWindow::MainWindow(QWidget *parent) :
// pass the window ID to the mpv wid option. Works on: X11, win32, Cocoa
mpv_container = new QWidget(this);
setCentralWidget(mpv_container);
mpv_container->setAttribute(Qt::WA_DontCreateNativeAncestors);
mpv_container->setAttribute(Qt::WA_NativeWindow);
// If you have a HWND, use: int64_t wid = (intptr_t)hwnd;
int64_t wid = mpv_container->winId();