[Qt-interest] Need help with QMacNativeWidget usage

Rush Manbert rush at manbert.com
Fri Mar 27 18:54:58 CET 2009


I have been able to use QMacNativeWidget to display a QWebKit widget  
in a native app, using both Carbon and Cocoa native apps.

However, the only way I can get it to work is to instantiate a  
QApplication object (because the Widget constructor asserts unless a  
QApplication object exists), and when I do that it seems to blow away  
the native application's menus. They disappear from the menu bar.

I tried using this QApplication constructor: QApplication(int &argc,  
char **argv, bool GUIenabled, int = QT_VERSION);
and passing false as the bool argument, but then I can't construct any  
Widgets because the init routine asserts (because graphics aren't  
enabled).

I'm not too proud to beg. Please can someone who understands how this  
is supposed to work explain it? Or can someone please point me to an  
example that shows the proper usage? Google normal and code search  
have not been helpful.

- Rush



More information about the Qt-interest-old mailing list