1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/qtmac-as-native.doc:36 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>Qt/Mac is Mac OS X Native</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Qt/Mac is Mac OS X Native</h1>
|
---|
33 |
|
---|
34 |
|
---|
35 | <p>
|
---|
36 | <p> This document explains what makes an application "native" on Mac OS X.
|
---|
37 | It shows the areas where Qt/Mac is compliant, and the grey areas where
|
---|
38 | compliance is more questionable. (See also the document
|
---|
39 | <a href="mac-differences.html">Qt/Mac Issues</a>.)
|
---|
40 | <p> Normally when referring to a native application, one really means an
|
---|
41 | application that talks directly to the underlying window system and
|
---|
42 | operating system, rather than one that uses some intermediary (for
|
---|
43 | example the X11 server, or a web browser). Qt/Mac applications run as
|
---|
44 | first class citizens, just like Cocoa, Java, and Carbon applications.
|
---|
45 | <p> When an application is running as a first class citizen it means that
|
---|
46 | it can interact with specific components of the Mac OS X experience:
|
---|
47 | <p> <ul>
|
---|
48 | <li> <b>The global menubar</b><br>
|
---|
49 | <p> Qt/Mac does this via the <a href="qmenubar.html">QMenuBar</a> abstraction. Mac users expect to
|
---|
50 | have a menubar at the top of the screen and Qt/Mac honors this.
|
---|
51 | <p> Additionally, users expect certain conventions to be respected, for
|
---|
52 | example the application menu should contain About, Preferences,
|
---|
53 | Quit, etc. Qt/Mac handles this automatically, although it does not
|
---|
54 | provide a means of interacting directly with the application menu.
|
---|
55 | (By doing this automatically, Qt/Mac makes it easier to port Qt/Mac
|
---|
56 | applications to other platforms.)
|
---|
57 | <p> <li> <b>Aqua</b><br>
|
---|
58 | <p> This is a critical piece of Mac OS X (documentation can be found at
|
---|
59 | <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html">http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html</a>).
|
---|
60 | It is a huge topic, but the most important guidelines for GUI
|
---|
61 | design are probably these:
|
---|
62 | <p> <ul>
|
---|
63 | <li> <em>Aqua look</em><br>
|
---|
64 | <p> As with Cocoa/Carbon Qt/Mac provides widgets that look like
|
---|
65 | those described in the Human Interface Descriptions. Qt/Mac's
|
---|
66 | widgets use the Appearance Manager to implement the look, so
|
---|
67 | Apple's own API's are doing the rendering (Qt/Mac <3.1 used an
|
---|
68 | emulation style with pixmaps, however this quickly proved to be
|
---|
69 | cumbersome, and unable to keep up with style changes at Apple).
|
---|
70 | <p> <li> <em>Aqua feel</em><br>
|
---|
71 | <p> This is a bit more subjective, but certainly Qt/Mac strives to
|
---|
72 | provide the same feel as any Mac OS X application (and we
|
---|
73 | consider situations where it doesn't achieve this to be bugs).
|
---|
74 | Of course Qt has other concerns to bear in mind, especially
|
---|
75 | remaining multiplatform. Some "baggage" that Qt carries is in
|
---|
76 | an effort to provide a widget on a platform for which an
|
---|
77 | equivelant doesn't exist, or so that a single API can be used to
|
---|
78 | do something, even if the API doesn't make entire sense for a
|
---|
79 | specific widget (for example pushbuttons with a popup menu are
|
---|
80 | really bevel buttons in Mac OS X, but Qt/Mac cannot guess that
|
---|
81 | this bevel button is right next to other real pushbuttons).
|
---|
82 | <p> <li> <em>Aqua guides</em><br>
|
---|
83 | <p> This is the most subjective, but there are many suggestions and
|
---|
84 | guidelines in the Aqua style guidelines. This is the area where
|
---|
85 | Qt/Mac is of least assistance. The decisions that must be made
|
---|
86 | to conform (widget sizes, widget layouts with respect to other
|
---|
87 | widgets, window margins, etc) must be made based on the user
|
---|
88 | experience demanded by your application. If your user base is
|
---|
89 | small or mostly comes from the Windows or Unix worlds, these are
|
---|
90 | minor issues much less important than trying to make a mass
|
---|
91 | market product. Qt/Mac is fully API compatible with Qt/Windows
|
---|
92 | and Qt/X11, but Mac OS X is a significantly different platform
|
---|
93 | to Windows and some special considerations must be made based on
|
---|
94 | your audience.
|
---|
95 | <p> </ul>
|
---|
96 | <p> <li> <b>Dock</b><br>
|
---|
97 | <p> Interaction with the dock is limited, but at the very least the icon
|
---|
98 | should be able to be interacted with. This can be achieved with
|
---|
99 | <a href="qwidget.html#setIcon">QWidget::setIcon</a>(). The setIcon() call can be made as often as
|
---|
100 | necessary, so can be used to provide a constantly updating pixmap
|
---|
101 | that works as expected.
|
---|
102 | <p> <li> <b>Accessiblity</b><br>
|
---|
103 | <p> Although many users never use this, some users will only interact
|
---|
104 | with your applications via assistive devices. With Qt the aim is to
|
---|
105 | make this automatic in your application so that it conforms to
|
---|
106 | accepted practice on its platform (X11 accessiblity support is
|
---|
107 | still in the works due to the developing nature of its
|
---|
108 | accessibility design). With Qt 3.3 Qt/Mac will support
|
---|
109 | accessiblity, and hopefully a host of assistive devices.
|
---|
110 | <p> <li> <b>Build tools</b><br>
|
---|
111 | <p> Mac OS X developers expect a certain level of interopability
|
---|
112 | between their development toolkit and the platform's developer
|
---|
113 | tools (for example MSVC, gmake, etc). Qt/Mac supports both Unix
|
---|
114 | style Makefiles, and ProjectBuilder/Xcode project files by using
|
---|
115 | the qmake tool. For example:
|
---|
116 | <p> <pre>
|
---|
117 | qmake -spec macx-pbuilder project.pro
|
---|
118 | </pre>
|
---|
119 |
|
---|
120 | <p> will generate an Xcode project file from project.pro. With qmake
|
---|
121 | you do not have to worry about rules for Qt's preprocessors (moc
|
---|
122 | and uic) since qmake automatically handles them and ensures that
|
---|
123 | everything necessary is linked into your application.
|
---|
124 | <p> Qt does not entirely interact with the development environment (for
|
---|
125 | example plugins to set a file to 'mocable' from within the Xcode
|
---|
126 | user interface). Trolltech is actively working on improving Qt's
|
---|
127 | interoperability with various IDEs, so hopefully this will be
|
---|
128 | supported soon.
|
---|
129 | <p> </ul>
|
---|
130 | <p>
|
---|
131 | <!-- eof -->
|
---|
132 | <p><address><hr><div align=center>
|
---|
133 | <table width=100% cellspacing=0 border=0><tr>
|
---|
134 | <td>Copyright © 2007
|
---|
135 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
136 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
137 | </table></div></address></body>
|
---|
138 | </html>
|
---|