Qt# Frequently Asked Questions


Contents


General Questions

What is Qt#?

Qt# is a binding of the Qt toolkit to the C# programming lanaguage.

Where can I obtain Qt#?

The latest version can be obtained as part of kdebindings in the form of a snapshot or from CVS. When using CVS, it is only necessary to checkout kdebindings/qtc and kdebindings/qtcsharp.

Older versions of Qt# can be found here

Who is developing Qt#?

Adam Treat

Are the KDE classes supported?

Not yet. Support is planned for the KDE classes after the Qt classes are fully implemented.

On what platforms can Qt# be used?

Currently, Qt# works under Qt/X11. In the future, Qt# will support Qt/Windows and Qt/Embedded.

Where can I find more information about Qt#?

More information can be found at the Qt# website http://qtcsharp.sourceforge.net. Also consider joining the mailing list at http://lists.sourceforge.net/lists/listinfo/qtcsharp-list.

How can I help?

A TODO list is located on the Qt# website. If you would like to work on these or other tasks for Qt#, send email to the mailing list qtcsharp-list@lists.sourceforge.net.

Installation and Configuration

What additional packages are required to install and use Qt#?

Besides GCC, the following packages are required:

Remember, of course, that if Qt# was obtained as part of kdebindings from CVS, Qtc will already be present. Just remember to build Qtc before Qt#.

What are these messages about ``** (process:447): WARNING **: Failed to load function qt_QObject.....'' when starting programs compiled with Qt#?

These messages, annoying though they might be, can safely be ignored. Qt-CSharp generates its bindings directly from the Qt headers rather than from the Qtc headers. An upcoming release of Qt-CSharp will eliminate these spurious messages.

Why do I get an error ``Failed to load library libqtcsharp'' when starting programs compiled with Qt#, and how do I fix it?

Mono is unable to load the shared library libqtcsharp.so. This might occur with versions of Qt# <= 0.3. Upgrading to a newer version from KDE snapshots or CVS should fix the problem.

Usage and Programming

How do I compile Qt# program?

Assuming that you are using Mono and that you have installed Qt.dll in the default directory Mono searched for libraries, you can simply run ``mcs -r Qt myprogram.cs'' to produce myprogram.exe. If you have placed Qt.dll elsewhere, you might try ``mcs -r /complete/path/to/Qt.dll myprogram.cs''.

How do I run a Qt# program?

To run the compiled program myprogram.exe, simply use ``mono myprogram.exe''.

My program compiles fine, but I am getting error messages about a ``Missing method .ctor in typeref index'. What's wrong?

Make sure that you are using the latest version of Mono. Earlier versions have problems with nested enums. If that does not solve the problem, report it to the mailing list.

Is it possible to create custom slots in Qt#?

Yes, but in version 0.3, only one custom slot is allowed. This limitation may be lifted soon.

What are the other limitation of Qt#?

The major limitations are that several Qt classes are missing, some of the type mappings are not optimal (e.g. string to QString), and KDE classes are not implemented.