Qt

From OLPC
Revision as of 15:59, 1 December 2007 by Bero (talk | contribs) (Add some more API documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ark Linux has started a library that allows Qt applications to run as activities.

To download the code, use

svn co svn://arklinux.org/olpc-qt/trunk olpc-qt

and follow the instructions in the included INSTALL file.


The library code is in the lib/ subdirectory, and example activity can be found in src/.

The idea is to port an application with as little effort as possible: Just use QActivity instead of QApplication and tell QActivity what your top level window is (QActivity::setTopLevelWidget), and it will run as activity. A QActivity based application automatically detects whether or not it is being run from sugar, and runs as a normal fullscreen application if it's run outside sugar.

QActivity::dataDir(), QActivity::instanceDir() and QActivity::tmpDir() return the SUGAR_ACTIVITY_ROOT environment while running in sugar, and equivalent other directories when running outside sugar.

Currently, only the basics are implemented - help with making more features (such as better Mesh network integration) available to Qt based activities is welcome.