Qt internal error: qt_menu.nib could not be loaded
Hi all,
Since we upgraded to 4.6.3 (and to 64 bit, and to Snow Leopard ... I'm on a mac) I started getting this strange error:
Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.
The thing that's weird is I think it IS there:
pb-d-128-141-37-36:~$ ls $QTDIR/QtGui.framework/Versions/Current/Resources/
qt_menu.nib
I've tried copying it locally and various other hacks, but with no luck. Does anyone have a clue?
Cheers,
Ed
Re: Qt internal error: qt_menu.nib could not be loaded
Just to say that I ran our app with Dtrace enabled and I don't see any attempt to open qt_menu.nib!
I don't quite know what to make of this - it sort of seems like there might be a Qt bug here (but of course it's always easy to blame someone else).
I'm really at a loss to know what to try next though.
Re: Qt internal error: qt_menu.nib could not be loaded
Hi all,
Still struggling with this. So the error comes from:
QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) alloc] init];
if ([NSBundle loadNibNamed:@"qt_menu" owner:qtMenuLoader] == false) {
qFatal("Qt internal error: qt_menu.nib could not be loaded. The .nib file"
" should be placed in QtGui.framework/Versions/Current/Resources/ "
" or in the resources directory of your application bundle.");
}
(in qapplication_mac.mm).
Now, I'm wondering if there's some search path for the NIB files? Some environment variable I can set? I'm browsing Apple's docs but it's not clear to me.
Re: Qt internal error: qt_menu.nib could not be loaded
Old thread, but will put some info here to help the next punter...
1) I suspect your $QTDIR is the Qt source tree, not the QtGui.framework that the executable is suggesting you add qt_menu.nib into? The latter would be:
Blah.app/Contents/Frameworks/QtGui.framework/Resources
2) If you are running a console binary (i.e. CONFIG += console), something like this should work:
ln -s $QTDIR/src/gui/mac/qt_menu.nib .
./executable
3) There is a tool in Qt, macdeployqt, which might do the right thing?
4) The Apple code that loads the NIB, NSBundle loadNibNamed, is actually deprecated in 10.8 onwards, but this should describe the directory structures:
https://developer.apple.com/library/...123i-CH101-SW1
However, creating Resources/en.lproj/qt_menu.nib didn't work for me :-(