title: Mixing Qt and Cocoa via QMacNativeWidget- I'm having trouble showing a QDialog over an NSWindow
body: <p>I am working on a plugin for a Cocoa application, and in order to use existing cpp code we decided to marry the Cocoa plugin with our existing Qt project via Objective-C++, which has been a lot to learn on the fly but is coming along well.</p>
  
  <p>Anyways, I am stumped by my current problem. The design of this plugin is such that the application gives us an NSWindow with two NSViews inside it. We place a QMacNativeWidget which inside one of these two views, and everything there works fine. The problem that I am having is that when I try to create a new QDialog() from within our plugin, the QDialog is always behind the NSWindow containing the plugin.</p>
  
  <p>Regardless of whether or not I raise() the new QDialog, the NSWindow is always in front even though it immediately loses keyboard focus to the QDialog. If I move the NSWindow I can see the QDialog behind it, but even when I click on its titlebar and move it around, it is still behind the NSWindow.</p>
  
  <p>Was just wondering if anyone has had any similar problems with mixing NSWindows and QDialogs, and if there is any possible solution other than wrapping my QDialog in another QMacNativeWidget and then placing it in another NSWindow, which I would rather not have to do because I have many dialogs.</p>
  
  <p>Thanks.</p>