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"><!--
|
---|
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 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
|
---|
37 | Edition</a> and is <em>not</em> part of the Free or Non-Commercial
|
---|
38 | Editions.
|
---|
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
|
---|
42 | applications to the more comfortable Qt toolkit. This extension
|
---|
43 | replaces the older Xt/Motif Support Extension included with earlier
|
---|
44 | versions 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
|
---|
51 | Xt/Motif extension. This class is unsupported and has many known
|
---|
52 | problems and limitations. It is provided only to keep existing source
|
---|
53 | working; 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
|
---|
60 | complete 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
|
---|
67 | and color depth that <a href="qapplication.html">QApplication</a> uses. When using CDE, the color
|
---|
68 | scheme may be incorrect when using a Visual, Colormap and color depth
|
---|
69 | that is not the default. To work around this problem, add the
|
---|
70 | following 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
|
---|
79 | headers. The solution is to include all Qt headers first, followed by
|
---|
80 | headers from this extension, and all Xt/Motif and X11 headers last.
|
---|
81 | For example:
|
---|
82 | <p> <pre>
|
---|
83 | // Qt headers first
|
---|
84 | #include <<a href="qapplication-h.html">qapplication.h</a>>
|
---|
85 | #include <<a href="qpushbutton-h.html">qpushbutton.h</a>>
|
---|
86 | #include <<a href="qsocket-h.html">qsocket.h</a>>
|
---|
87 | ...
|
---|
88 |
|
---|
89 | // QMotif* headers next
|
---|
90 | #include <<a href="qmotif-h.html">qmotif.h</a>>
|
---|
91 | #include <<a href="qmotifdialog-h.html">qmotifdialog.h</a>>
|
---|
92 | #include <<a href="qmotifwidget-h.html">qmotifwidget.h</a>>
|
---|
93 |
|
---|
94 | // Xt/Motif and X11 headers last
|
---|
95 | #include <X11/Xlib.h>
|
---|
96 | #include <Xt/Intrinsic.h>
|
---|
97 | #include <Xm/Xm.h>
|
---|
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
|
---|
104 | top-level windows on multiple screens. A common mistake is to create
|
---|
105 | a QMotifWidget on a non-default screen while the Xt/Motif widgets are
|
---|
106 | created on the default screen. The solution is to specify the screen
|
---|
107 | to 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>()->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 © 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>
|
---|