| | | | |
| |
| In lugnet.cad.dev, Jim DeVona wrote:
> In lugnet.cad.dev, Kevin L. Clague wrote:
>
> > I got a Mac mini yesterday, so I'm at the bottom of the learning curve on
> > getting LPub going there. I know it is unix (which I know very well), but I did
> > not find make or the gcc tools (which I also know very well) using find.
> >
> > I'm antsy to get going there. Any ideas on where to get started?
>
> I think those and other development tools are available as an optional install
> from your system DVD, if they're not already present on the machine.
>
> Jim
So, popup menus work, but my main menu does not show up.
I found this information on trolltech:
http://doc.trolltech.com/3.3/mac-differences.html
but I don't know what it means to run out of a bundle.
Qmake created
lpub.app
Contents
Info.plist
MacOS
PkgInfo
Info.plist contains
<?xml version "1.0" "file://localhost/System/Library/DTDs/Property/List.dtd>
<plist version="0.9">
<dict>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>lpub</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated buy
Qt/Qmake.</string>
</dict>
</plist>
PkgInfo contains
APPL????
It would seem these files are related to the issue, but I've got no idea how to
change them to use widgets.app as indicated by trolltech.
Any ideas?
Kevin
| | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> So, popup menus work, but my main menu does not show up.
OK, that's very very strange. LDView's main menu "just worked" (mostly). I had
to do some fixups to make it fit the Mac style, but it was perfectly usable
without those. It "just works" when compiled with QT 4 also.
> I found this information on trolltech:
>
> http://doc.trolltech.com/3.3/mac-differences.html
It's not talking about the menu you think it's talking about. The "Application
Menu" on a Mac isn't the application's menu, it's the first item in the
application's menu, with a title that matches the application name. The
"Bundle" they're referring to is just the app wrapper (the LPub.app dir).
--Travis
| | | | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> So, popup menus work, but my main menu does not show up.
Just out of curiosity, what IS in the menu bar when the LPub window is the
current active window?
--Travis
| | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Travis Cobbs wrote:
> In lugnet.cad.dev, Kevin L. Clague wrote:
> > So, popup menus work, but my main menu does not show up.
>
> Just out of curiosity, what IS in the menu bar when the LPub window is the
> current active window?
>
> --Travis
All I get is a single menu item in the menu bar above the desktop. It says
LPub. The contents of the menu are not from LPub though.
I've built LPub using QMainWindow. It has a function that returns a pointer to
the menuBar(). I build all my main menus using that.
Maybe you're doing things differently?
Kevin
| | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> All I get is a single menu item in the menu bar above the desktop. It says
> LPub. The contents of the menu are not from LPub though.
>
> I've built LPub using QMainWindow. It has a function that returns a pointer to
> the menuBar(). I build all my main menus using that.
>
> Maybe you're doing things differently?
LDView has its main menu inside the .ui file for the main window. It was
created and is maintained in QT Designer. Take a look at LDView.ui to see if
there's anything obviously different there.
--Travis
| | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Travis Cobbs wrote:
> In lugnet.cad.dev, Kevin L. Clague wrote:
> > All I get is a single menu item in the menu bar above the desktop. It says
> > LPub. The contents of the menu are not from LPub though.
> >
> > I've built LPub using QMainWindow. It has a function that returns a pointer to
> > the menuBar(). I build all my main menus using that.
> >
> > Maybe you're doing things differently?
>
> LDView has its main menu inside the .ui file for the main window. It was
> created and is maintained in QT Designer. Take a look at LDView.ui to see if
> there's anything obviously different there.
>
> --Travis
Hmmm..... one major difference is that I didn't use the designer for any of my
GUI.
I wonder if that is why things are different.
Kevin
| | | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> Hmmm..... one major difference is that I didn't use the designer for any of my
> GUI.
>
> I wonder if that is why things are different.
I'm guessing it's related, but there's presumably something you did that QT
Designer doesn't do, or vice versa. Obviously QT is designed so that apps can
be written completely without using QT Designer.
One thing you might do is create a QMainWindow subclass in QT Designer, add menu
items to that, then set that as the superclass of your current main window
class. See if the Desinger-designed menu shows up.
To be honest, I would think it would be a lot easier to maintain your main menu
using Designer. If the above test menu shows up, you might consider just doing
that and getting rid of your source-code based menu/action building.
--Travis
| | | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> In lugnet.cad.dev, Travis Cobbs wrote:
> > In lugnet.cad.dev, Kevin L. Clague wrote:
> > > All I get is a single menu item in the menu bar above the desktop. It says
> > > LPub. The contents of the menu are not from LPub though.
> > >
> > > I've built LPub using QMainWindow. It has a function that returns a pointer to
> > > the menuBar(). I build all my main menus using that.
> > >
> > > Maybe you're doing things differently?
> >
> > LDView has its main menu inside the .ui file for the main window. It was
> > created and is maintained in QT Designer. Take a look at LDView.ui to see if
> > there's anything obviously different there.
> >
> > --Travis
>
> Hmmm..... one major difference is that I didn't use the designer for any of my
> GUI.
>
> I wonder if that is why things are different.
>
> Kevin
problem fixed.
extern void qt_mac_set_native_menubar(bool);
qt_mac_set_native_menubar(true);
Kevin
| | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, Kevin L. Clague wrote:
> problem fixed.
>
> extern void qt_mac_set_native_menubar(bool);
> qt_mac_set_native_menubar(true);
>
> Kevin
OK, now that's just plain weird. Glad to hear it's fixed, though.
--Travis
| | | | | | | | | | | | | | | |
| |
| In lugnet.cad.dev, Kevin L. Clague wrote:
> So, popup menus work, but my main menu does not show up.
>
> I found this information on trolltech:
>
> http://doc.trolltech.com/3.3/mac-differences.html
>
> but I don't know what it means to run out of a bundle.
>
> Qmake created
>
> lpub.app
> Contents
> Info.plist
> MacOS
> PkgInfo
>
> Info.plist contains
>
> <?xml version "1.0" "file://localhost/System/Library/DTDs/Property/List.dtd>
> <plist version="0.9">
> <dict>
> <key>CFBundleIconFile</key>
> <string></string>
> <key>CFBundlePackageType</key>
> <string>APPL</string>
> <key>CFBundleGetInfoString</key>
> <string>Created by Qt/QMake></string>
> <key>CFBundleSignature</key>
> <string>????</string>
> <key>CFBundleExecutable</key>
> <string>lpub</string>
> <key>NOTE</key>
> <string>Please, do NOT change this file -- It was generated buy
> Qt/Qmake.</string>
> </dict>
> </plist>
>
> PkgInfo contains
>
> APPL????
>
> It would seem these files are related to the issue, but I've got no idea how to
> change them to use widgets.app as indicated by trolltech.
I'm not too familiar with Qt or Trolltech's recommendations, so maybe someone
else can help work out what you need to do. The Mac version of LDView 3.2 is a
Qt app, so maybe Travis can get you started.
The application bundle structure applies to most apps, though, so if you're not
familiar with that yet, take a look at some other applications to see how it
works. Right-click an application and select "Show Package Contents" - you'll
see the same sort of directory structure. Contents/Info.plist provides all sorts
of meta-data about the program
(http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html),
Contents/MacOS typically contains the actual executable, and Contents/Resources
holds pretty much anything else - icons, help, etc. (Although Qmake presumably
sets all this up for you.)
The CFBundleExecutable property in Info.plist identifies the executable in
Contents/MacOS that runs when you launch the application.
Jim
| | | | | | |