Mac Menus are not active ????
-
@Nevering
A test project would be great. -
I think I've added the code here ??
https://github.com/Nevering/Splitters.git -
I think I've added the code here ??
https://github.com/Nevering/Splitters.git@Nevering
"This repository is empty." -
@Nevering
Well, it's pretty simple in your case, don't do:CONFIG -= app_bundle -
@Nevering said in Mac Menus are not active ????:
why ?
Gui applications on Mac are bundles.
If I don't the files in the subdirectories are not found
Look at how to embed resources, either the Qt way, with the 'Qt Resource Compiler' or the Mac's way with bundle resources.
If you really want to keep those as external files you'll need to adjust the relative path on Mac.
-
is this a good reference, or is there a better one, this is from 4.8.
-
I ran a test and saw exactly what you described in this thread (Qt 5.6.0, OSX 10.10.5, XCode 7.2.1). I tried changing a few things here and there in the source to see if I could get it to work without success. Changes in the PRO file seemed to affect it.
In the project file I remove this line:
CONFIG -= app_bundleand replaced it with this:
CONFIG +=release \ warn_on \ qt \ threadIt worked fine after this change for some reason.
I didn't look into what the differences are in these options of the project file. These are common options I use for everything. Maybe try this and see if this works for you as well.
I also tried converting the UI file into a set of cpp files (generic main.cpp, mainwindow.cpp, and mainwindow.h). It worked regardless of the above change in the PRO file.
It looks like there is something odd going on but I am not sure what the source is. The project file supplied with this sample should be cleaned up regardless (maybe this is the underlying reason?). The project file from the CPP generated version is a little more complete so this could be a reason I didn't see this problem with the derived version and only with the UI version (?).
-
I ran a test and saw exactly what you described in this thread (Qt 5.6.0, OSX 10.10.5, XCode 7.2.1). I tried changing a few things here and there in the source to see if I could get it to work without success. Changes in the PRO file seemed to affect it.
In the project file I remove this line:
CONFIG -= app_bundleand replaced it with this:
CONFIG +=release \ warn_on \ qt \ threadIt worked fine after this change for some reason.
I didn't look into what the differences are in these options of the project file. These are common options I use for everything. Maybe try this and see if this works for you as well.
I also tried converting the UI file into a set of cpp files (generic main.cpp, mainwindow.cpp, and mainwindow.h). It worked regardless of the above change in the PRO file.
It looks like there is something odd going on but I am not sure what the source is. The project file supplied with this sample should be cleaned up regardless (maybe this is the underlying reason?). The project file from the CPP generated version is a little more complete so this could be a reason I didn't see this problem with the derived version and only with the UI version (?).
-
You misunderstood the documentation. As stated just about the code snippet, the
CONFIG -= app_bundleline applies only to command line tools.Otherwise, use a bundle. macOS looks for information in that bundle: the
Info.plistfile being the central point of interest. Qt generates one for you automatically with sensible defaults.Depending on what feature you'll be using, you will have to provide your own file.
-
Where did you look for it ?
-
I saw it in the Mac documentation.. And I did a search on my Mac. There doesnt' seem to be any related info.plist file generated in the local folder. However there are some on the system and in the Qt example folder. Still trying to figure this out, documentation on this would really help ...
-
The Info.plist file can be found in
./your_application_name.app/Contents/.