Integrating a Qt application with both desktops



We have an application in Qt that is currently running on both linux
and Win32.  The features currently missing from the linux version, but 
present in the Win32 version, are:
 - context sensitive HTML help
 - opening of documents in other applications, based on their type 

I'm looking into if it's possible to add these features in such a way
that things will work under either desktop.

Since we've implemented our application in Qt, using the KDE libraries
provides the simplest route towards linux desktop integration:

 - using KApplication instead of QApplication will give us access to
   HTML help
	<http://developer.kde.org/documentation/library/2.0-api/classref/kdecore/KApplication.html#ref21>

 - using the KRun class we can open a document in the application that 
   supports it
	<http://developer.kde.org/documentation/library/2.0-api/classref/kio/KRun.html>

The similar APIs in the gnome libraries, seem to be:
	<http://developer.gnome.org/doc/API/libgnome/gnome-gnome-help.html>
	<http://developer.gnome.org/doc/API/libgnome/gnome-gnome-exec.html>

Now the things I'm wondering, are: will adding the KDE support make the 
application run right on a gnome desktop as well?

Or do I need to detect what desktop is running, and do calls from the
Gnome API (and linking with the gnome libraries as well)?

Is it even possible to detect what desktop is running?

And if I need to use Gnome API calls, do I need to integrate the Gnome
stuff with the Qt event loop?

I'm just thinking out loud, while reading the docs, but all feedback
and viewpoints are appreciated.

Thanx!


- Steinar




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]