source: trunk/doc/html/qtmac-as-native.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 6.9 KB
Line 
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"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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.
37It shows the areas where Qt/Mac is compliant, and the grey areas where
38compliance 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
41application that talks directly to the underlying window system and
42operating system, rather than one that uses some intermediary (for
43example the X11 server, or a web browser). Qt/Mac applications run as
44first class citizens, just like Cocoa, Java, and Carbon applications.
45<p> When an application is running as a first class citizen it means that
46it 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
50have a menubar at the top of the screen and Qt/Mac honors this.
51<p> Additionally, users expect certain conventions to be respected, for
52example the application menu should contain About, Preferences,
53Quit, etc. Qt/Mac handles this automatically, although it does not
54provide a means of interacting directly with the application menu.
55(By doing this automatically, Qt/Mac makes it easier to port Qt/Mac
56applications 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>).
60It is a huge topic, but the most important guidelines for GUI
61design 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
65those described in the Human Interface Descriptions. Qt/Mac's
66widgets use the Appearance Manager to implement the look, so
67Apple's own API's are doing the rendering (Qt/Mac &lt;3.1 used an
68emulation style with pixmaps, however this quickly proved to be
69cumbersome, 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
72provide the same feel as any Mac OS X application (and we
73consider situations where it doesn't achieve this to be bugs).
74Of course Qt has other concerns to bear in mind, especially
75remaining multiplatform. Some "baggage" that Qt carries is in
76an effort to provide a widget on a platform for which an
77equivelant doesn't exist, or so that a single API can be used to
78do something, even if the API doesn't make entire sense for a
79specific widget (for example pushbuttons with a popup menu are
80really bevel buttons in Mac OS X, but Qt/Mac cannot guess that
81this 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
84guidelines in the Aqua style guidelines. This is the area where
85Qt/Mac is of least assistance. The decisions that must be made
86to conform (widget sizes, widget layouts with respect to other
87widgets, window margins, etc) must be made based on the user
88experience demanded by your application. If your user base is
89small or mostly comes from the Windows or Unix worlds, these are
90minor issues much less important than trying to make a mass
91market product. Qt/Mac is fully API compatible with Qt/Windows
92and Qt/X11, but Mac OS X is a significantly different platform
93to Windows and some special considerations must be made based on
94your 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
98should 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
100necessary, so can be used to provide a constantly updating pixmap
101that works as expected.
102<p> <li> <b>Accessiblity</b><br>
103<p> Although many users never use this, some users will only interact
104with your applications via assistive devices. With Qt the aim is to
105make this automatic in your application so that it conforms to
106accepted practice on its platform (X11 accessiblity support is
107still in the works due to the developing nature of its
108accessibility design). With Qt 3.3 Qt/Mac will support
109accessiblity, 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
112between their development toolkit and the platform's developer
113tools (for example MSVC, gmake, etc). Qt/Mac supports both Unix
114style Makefiles, and ProjectBuilder/Xcode project files by using
115the 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
121you do not have to worry about rules for Qt's preprocessors (moc
122and uic) since qmake automatically handles them and ensures that
123everything necessary is linked into your application.
124<p> Qt does not entirely interact with the development environment (for
125example plugins to set a file to 'mocable' from within the Xcode
126user interface). Trolltech is actively working on improving Qt's
127interoperability with various IDEs, so hopefully this will be
128supported 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 &copy; 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>
Note: See TracBrowser for help on using the repository browser.