📄 javaintegration.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/doc/javaintegration.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font> <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="137"> <tr> <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td> <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td> </tr> </table></td></tr></table><p> <p> <h2> Qtopia - Java Integration</h2><a name="1"></a><p> When integrating a Java VM into Qtopia, it is important forthe end-user that installed Java applications operate seamlesslyalong with native Qtopia applications. To ensure this, thefollowing considerations should be made. These items are listedin order of the Qtopia aplication execution control flow andso correspond to the order in which they can be easily tested.<p> <ul><li> <b>Use .desktop files</b><p>Like native Qtopia applications, Java applications shouldbe referenced by .desktop files in the $QPEDIR/apps/Applicationsor $QPEDIR/apps/Games directory (depending whether it is an applicationor a game); they should not be boxed off into a seperate tab,or in a wholy different interface.</p><li> <b>Use unique executables</b><p>In order that Qtopia's execution model works, the Exec= lineof the .desktop file should specify a <i>unique</i> executable name.Of course, this executable name may simply be a symbolic linkto the actual executable which then uses argv[0] to determineits behaviour. This is essential for QCop communication betweenthe application and the launcher. In particular, it will <i>not</i>work to use "Exec=jvm appname".</p><li> <b>Use <a href="qpeapplication.html">QPEApplication</a></b><p>You must use QPEApplication, not QApplication, otherwise allof the framework provided for Qtopia will not function. In particular,QPEApplication communicates with the launcher via QCop to handlethings such as the taskbar icon, raising, quitting, openningdocuments, and changing styles and fonts.</p><li> <b>Use QPEApplication::exec()</b><p>This ensures that various things such as QCop processing isinitiated. If you must use your own event loop rather thanexec(), you must at least call QPEApplication::setMainWidget().If even this is not possible, additional functionality willneed to be added to QPEApplication to support your event loop.</p><li> <b>Follow Qtopia Conventions</b><p>The widget toolkit or bindings used by the JVM should whereverpossible follow Qtopia's conventions. For example, it shoulduse QPEApplication::execDialog() rather than QDialog::exec().</p></ul><p> The above rules can all be bent to various degrees, but that willinvolve additional integration coding in <a href="qpeapplication.html">QPEApplication</a> and in theQtopia launcher (qpe) process.<p> <!-- eof --><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright © 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -