[Interest] QMacNativeWidget weirdness
Nuno Santos
nunosantos at imaginando.pt
Tue Nov 24 14:28:05 CET 2015
Hi,
I’m trying to integrate a Qml window inside a NSView window. To do it so i’m using QMacNativeWidget with the following code:
NSView* view = (NSView*) ptr;
QMacNativeWidget *nativeWidget = new QMacNativeWidget(view);
NSView *nativeWidgetView = reinterpret_cast<NSView *>(nativeWidget->winId());
nativeWidget->setGeometry(QRect(0,0,640,480));
nativeWidget->show();
[view setNeedsDisplay:true];
The window appears but with a transparent gap between the top window frame and the qml content. This gap is actually overlapping the Qml content, however, the mouse interaction is being offset by exactly the same top margin. See screenshots below.
After trying so many different calls to update geometry or automatically adjusting view sizes. I have accidentally resized the window. After resizing it with the mouse pointer, the starts behaving correctly.
This seems some sort of non initialised/update property which is done when a window resize is performed. The problem is… I’m about to integrate this window on a non resizable window, thus I need to make it working correctly by simply performing some call.
- Does anyone here had this kind of problem before?
- Is there any work around for this?
- Should I report this as a bug?
Please advise.
Thanks in advance,
With my best regards,
Nuno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151124/7981156b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-11-24 at 13.19.51.png
Type: image/png
Size: 119724 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151124/7981156b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-11-24 at 13.20.02.png
Type: image/png
Size: 80810 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151124/7981156b/attachment-0001.png>
More information about the Interest
mailing list