{"id":25416382,"url":"https://github.com/forderud/qtnativewindow","last_synced_at":"2026-05-05T11:37:16.553Z","repository":{"id":243654956,"uuid":"812947837","full_name":"forderud/QtNativeWindow","owner":"forderud","description":"Sample code for embedding non-Qt UI in a Qt application and vice versa","archived":false,"fork":false,"pushed_at":"2024-08-20T14:40:15.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T01:43:16.337Z","etag":null,"topics":["qt","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forderud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-10T08:02:20.000Z","updated_at":"2024-08-20T14:40:18.000Z","dependencies_parsed_at":"2024-06-12T13:23:30.340Z","dependency_job_id":"373edd5e-6112-4cb2-bc26-717380e55740","html_url":"https://github.com/forderud/QtNativeWindow","commit_stats":null,"previous_names":["forderud/qtnativewindow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/forderud/QtNativeWindow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forderud%2FQtNativeWindow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forderud%2FQtNativeWindow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forderud%2FQtNativeWindow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forderud%2FQtNativeWindow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forderud","download_url":"https://codeload.github.com/forderud/QtNativeWindow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forderud%2FQtNativeWindow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264113542,"owners_count":23559374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qt","windows"],"created_at":"2025-02-16T16:54:53.421Z","updated_at":"2026-05-05T11:37:16.546Z","avatar_url":"https://github.com/forderud.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sample code for **embedding non-Qt UI in a Qt application**. Emphasis is put on native windows and OLE controls with transparent background.\n\nScreenshot:  \n![image](https://github.com/user-attachments/assets/120e6645-db4b-4eae-93ce-809f9cad4ad5)\n\nWindow hierarchy with [extended window styles](https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles):  \n![image](https://github.com/forderud/QtNativeWindow/assets/2671400/bf7e0231-3e0a-43cc-929a-7949e1cf8866)\n\n## Discovered issues\n\n### Qt foreign window flickering\n\n[QTBUG-126280](https://bugreports.qt.io/browse/QTBUG-126280): The semi-transparent foreign windows showing green \u0026 blue circles will *flicker when the main window is resized*. This is currently worked around by manually setting `WS_EX_COMPOSITED` on the parent Qt window. However, this feels like a hack that leads to other drawing artifacts.\n\nStop defining `AVOID_FLICKERING_WITH_COMPOSITED_WINDOW` to reproduce this issue.\n\n### Qt OLE control transparency problem\n\n[QTBUG-132671](https://bugreports.qt.io/browse/QTBUG-132671): How to create a semi-transparent ActiveQt window?\n\n[QAxWidget](https://doc.qt.io/qt-6/qaxwidget.html) doesn't seem to handle OLE controls with transparent background properly. This leads to drawing artifacts where the background is not cleared.\n\n## Prerequisites\n* [Visual Studio 2022](https://visualstudio.microsoft.com/)\n  - Select \"Desktop development with C++\" workload.\n  - Select \"C++ MFC for latest v143 build tools (x86 \u0026 x64)\" component.\n* [Qt SDK](https://www.qt.io/product/development-tools) (any recent version)\n  - Select \"Active Qt\" component.\n* [Qt VS Tools](https://doc.qt.io/qtvstools/)\n\n## Qt documentation\n* Qt [Window Embedding](https://doc.qt.io/qt-6/platform-integration.html#window-embedding)\n* [QWindow::fromWinId](https://doc.qt.io/qt-6/qwindow.html#fromWinId)\n* [QWidget::createWindowContainer](https://doc.qt.io/qt-6/qwidget.html#createWindowContainer)\n* [Using ActiveX controls and COM in Qt](https://doc.qt.io/qt-6/activeqt-container.html)\n\n## Microsoft resources\n* Raymond Chen: [I used WS_EX_COMPOSITED to get rid of my redrawing flicker, but it resulted in sluggish response](https://devblogs.microsoft.com/oldnewthing/20171018-00/?p=97245) - explains that `WS_EX_COMPOSITED` relies on the release the device contexts (DC) _or_ `End­Paint` calls to detect that rendering have completed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforderud%2Fqtnativewindow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforderud%2Fqtnativewindow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforderud%2Fqtnativewindow/lists"}