Wiki

root/cobra/trunk/HowTo/394-Qyoto.cobra

Revision 2138, 1.0 KB (checked in by Chuck.Esterbrook, 3 years ago)

Mark .skip. since most test systems won't have Qyoto installed.

  • Property svn:eol-style set to native
Line 
1# .skip.
2# .require. mono
3# .compile-only.
4"""
5A barebones Qt application using Qyoto.
6credit:Kurper
7
8If you're using (K)Ubuntu, you should be able to install Qyoto with:
9sudo apt-get install libqyoto-dev libqyoto4.4-cil
10
11If you're using a different version of Linux or a different OS, you'll want to
12do something else, and modify the below @ref to point to the appropriate DLL.
13You might be able to remove the @ref entirely; it seem likely that it's only
14necessary because of issues with the Qyoto package in Ubuntu.
15
16Once Qyoto's installed, you can run the program with:
17cobra 394-Qyoto.cobra
18"""
19
20@ref '/usr/lib/cli/kdebindings-4.4/qt-dotnet.dll'
21
22use Qyoto
23
24class Program
25
26    def main
27
28        qapp = QApplication(String[](0)) # we have no relevant args
29        mainWindow = QMainWindow()
30        mainWindow.show
31
32        butt = QPushButton('Quit')
33        QObject.connect(butt, Qt.signal('clicked()'), qapp, Qt.slot('quit()'))
34        mainWindow.setCentralWidget(butt)
35
36        mainWindow.setWindowTitle('Qt App')
37
38        QApplication.exec
Note: See TracBrowser for help on using the browser.