mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix the Qt native platform example
Fix regression introduced with commit d0cdc462c7
:
The window surface must exists before querying for the window handles.
This commit is contained in:
parent
d9bc7a08f9
commit
3db5b97790
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ slint::cbindgen_private::PointerEventButton convert_button(Qt::MouseButtons b)
|
|||
|
||||
static slint_platform::NativeWindowHandle window_handle_for_qt_window(QWindow *window)
|
||||
{
|
||||
// Ensure that the native window surface exists
|
||||
window->create();
|
||||
#ifdef __APPLE__
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void *nsview = native->nativeResourceForWindow(QByteArray("nsview"), window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue