[Qt-interest] Mac document application example?

Danny Price deepblue842 at googlemail.com
Thu Sep 1 14:16:22 CEST 2011


I'm working on a cross platform mutli-document Qt application (mac and
windows) but I'm having a lot of difficulty reproducing the behavior
expected in a classic OSX application (that is the same functionality you
get for 'free' with a document-based Cocoa application template),
particularly:

1) Sheet-based file save and save-changes dialogs. These are complicated
because you have to store flags and use special-casing in events while
waiting for the non-blocking sheets to be dismissed. Even QtCreator doesn't
do this.

2) A global menu bar that is independent of any one main window. I've
created a 'shared' QMenuBar by creating it manually in my application
subclass. However I will need to special-case this code for Windows where
each QMainWindow has it's own menu bar and actions. Using QMainWindow's
menuBar() function is no-good on OSX because that menubar is owned by the
widget and will be destroyed along with it (see 5).

3) Recent files submenu menu, including a Clear menu option.

4) Windows menu, containing minimize, zoom and open-document list.

5) The application must keep running after the last document is closed.

Does anyone know of any working examples of the above? Qt only meets you
half way and I while I have found examples for each case, I've not had much
luck combining them together.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110901/91428125/attachment.html 


More information about the Qt-interest-old mailing list