===== What is Qyoto? ===== Qyoto is a set of bindings created by the [[http://techbase.kde.org/Development/Languages|KDEbindings]] team that wrap the [[http://trolltech.com/products/qt/|Qt framework]]. Although it provides much more, Qt is mostly known as a professional cross-platform GUI toolkit. It is used by [[wp>KDE]] to render their famous desktop and its open source edition is since version 4 also available for Windows. Using Qyoto, you can use this C++ framework in your .NET programs. ==== Qyoto on Linux ==== On Linux you can get Qyoto either from your distributions package manager, or from the KDE language bindings. You can also compile them yourself from the KDE subversion repository. ==== Qyoto on Windows ==== On Linux, sources for Qyoto are generated by a [[wp>Perl]] script from the installed Qt headers. This is a problem for Windows users, since Windows doesn't include Perl, like most Linux distributions do. Also the used scripts don't operate well in a Windows environment or on the slightly different Qt/Win edition. In order to use Qyoto on Windows, you have to create the sources on Linux and the compile them in a Windows environment, see [[Building Qyoto for Windows]]. A binary package is available on our [[http://imaginary-project.net/download|download page]]. ===== Using Qyoto ===== To use Qyoto in your C# application, you need to add a reference qt-dotnet.dll. Next, you can use the Qt Designer, that comes with Qt, to visually design your GUI. When you save your design, you'll get one or two files: yourproject.ui containing the GUI data and yourproject.qrc containing the resources. Since you can't add them to your C# project directly, you'll need to convert them. You can use the command-line tools uics and csrcc for this: uics.exe -o yourproject.ui.cs yourproject.ui csrcc.exe -o yourproject.qrc.cs yourproject.qrc To do this automatically on every build, you can add these commands as pre-build event to your project. Now add the created .cs files to your C# project and start your window: class YourApp { // Test App public static int Main(string[] args) { QApplication app = new QApplication(args); QInitResources__dest_class__.QInitResources(); QMainWindow mainwindow = new QMainWindow(); Ui.MainWindow mainUi = new Ui.MainWindow(); mainUi.SetupUi(mainwindow); mainwindow.Show(); return QApplication.Exec(); } }