source: trunk/doc/html/motif-extension.html@ 208

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

reference documentation added

File size: 5.5 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/extensions/motif/doc/index.doc:3 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>Qt Motif Extension</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 Motif Extension</h1>
33
34
35<p> <!-- index Motif --><a name="Motif"></a>
36<p> This module is part of the <a href="commercialeditions.html">Qt Enterprise
37Edition</a> and is <em>not</em> part of the Free or Non-Commercial
38Editions.
39<p> <h2> Introduction
40</h2>
41<a name="1"></a><p> The Qt Motif Extension assists the migration of old Xt and Motif based
42applications to the more comfortable Qt toolkit. This extension
43replaces the older Xt/Motif Support Extension included with earlier
44versions of Qt.
45<p> The Qt Motif Extension consists of the following classes:
46<p> <ul>
47<li> <a href="qmotif.html">QMotif</a> - Provides the basis of the Qt Motif Extension.
48<li> <a href="qmotifwidget.html">QMotifWidget</a> - Provides the <a href="qwidget.html">QWidget</a> API for Motif widgets.
49<li> <a href="qmotifdialog.html">QMotifDialog</a> - Provides the <a href="qdialog.html">QDialog</a> API for Motif dialogs.
50<li> <a href="qxtwidget.html">QXtWidget</a> - The Xt/Motif integration widget from the previous
51Xt/Motif extension. This class is unsupported and has many known
52problems and limitations. It is provided only to keep existing source
53working; it should not be used in new code.
54</ul>
55<p> <h3> Additional Documentation
56</h3>
57<a name="1-1"></a><p> <ul>
58<p> <li> <a href="motif-examples.html">Examples</a>
59<li> <a href="motif-walkthrough.html">Migration Walkthrough</a> - A
60complete migration of a Motif based program to the Qt toolkit.
61<p> </ul>
62<p> <h2> Common Problems
63</h2>
64<a name="2"></a><p> <h3> Incorrect CDE Color Scheme
65</h3>
66<a name="2-1"></a><p> <a href="qmotifwidget.html">QMotifWidget</a> and <a href="qmotifdialog.html">QMotifDialog</a> will use the same Visual, Colormap
67and color depth that <a href="qapplication.html">QApplication</a> uses. When using CDE, the color
68scheme may be incorrect when using a Visual, Colormap and color depth
69that is not the default. To work around this problem, add the
70following resource string to your startup files (for example,
71<tt>$HOME/.dt/sessions/current/dt.resources</tt>):
72<p> <pre>
73 *userColorObj: false
74</pre>
75
76<p> <h3> X11 Header Conflicts
77</h3>
78<a name="2-2"></a><p> The X11 headers define some constants that conflict with the Qt
79headers. The solution is to include all Qt headers first, followed by
80headers from this extension, and all Xt/Motif and X11 headers last.
81For example:
82<p> <pre>
83 // Qt headers first
84 #include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
85 #include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
86 #include &lt;<a href="qsocket-h.html">qsocket.h</a>&gt;
87 ...
88
89 // QMotif* headers next
90 #include &lt;<a href="qmotif-h.html">qmotif.h</a>&gt;
91 #include &lt;<a href="qmotifdialog-h.html">qmotifdialog.h</a>&gt;
92 #include &lt;<a href="qmotifwidget-h.html">qmotifwidget.h</a>&gt;
93
94 // Xt/Motif and X11 headers last
95 #include &lt;X11/Xlib.h&gt;
96 #include &lt;Xt/Intrinsic.h&gt;
97 #include &lt;Xm/Xm.h&gt;
98 ...
99</pre>
100
101<p> <h3> Multiple Screen Support
102</h3>
103<a name="2-3"></a><p> <a href="qmotifwidget.html">QMotifWidget</a> can be used together with <a href="qdesktopwidget.html">QDesktopWidget</a> to create
104top-level windows on multiple screens. A common mistake is to create
105a QMotifWidget on a non-default screen while the Xt/Motif widgets are
106created on the default screen. The solution is to specify the screen
107to both QMotifWidget and the Xt/Motif child. For example:
108<p> <pre>
109 Display *dpy = QMotif::<a href="qmotif.html#x11Display">x11Display</a>();
110 Arg args[1];
111
112 // make sure both QMotifWidget and the XmMainWindow are on screen 1
113 XtSetArg(args[0], XtNscreen, ScreenOfDisplay(dpy, 1));
114 <a href="qmotifwidget.html">QMotifWidget</a> *toplevel =
115 new <a href="qmotifwidget.html">QMotifWidget</a>(QApplication::<a href="qapplication.html#desktop">desktop</a>()-&gt;screen(1),
116 xmMainWindowWidgetClass, args, 1, "mainwindow");
117</pre>
118
119<p>
120<!-- eof -->
121<p><address><hr><div align=center>
122<table width=100% cellspacing=0 border=0><tr>
123<td>Copyright &copy; 2007
124<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
125<td align=right><div align=right>Qt 3.3.8</div>
126</table></div></address></body>
127</html>
Note: See TracBrowser for help on using the repository browser.