Unsolved Problems occurred while tying to use createWindowContainer()
-
Hello,
I'm developing an application on Windows and I'm having some problems when trying to include an external window in Qt.
I read various posts on this topic but I'm still unable to fix the problem:I have the following snippet of code:
QWindow appWin = QWindow::fromWinId(winid); QWidget appWidget = QWidget::createWindowContainer(appWin);
it actually creates the required widget which displays what I need it to display. The problem is that I'm getting a white border(inside the widget) which surrounds the view.
Could anybody help me?
-
Hi and welcome to devnet,
You should add:
- Version of Qt
- OS version
- What you are embedding in that widget
-
Be aware that embedding external windows in widgets are problematic: https://bugreports.qt.io/browse/QTBUG-40320
I believe Qt 6 is meant to have improved support for embedding windows, but I haven't tested it myself yet. Perhaps you can download the Qt 6.0.0 beta and try it?