|
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 | """ |
|---|
| 5 | A barebones Qt application using Qyoto. |
|---|
| 6 | credit:Kurper |
|---|
| 7 | |
|---|
| 8 | If you're using (K)Ubuntu, you should be able to install Qyoto with: |
|---|
| 9 | sudo apt-get install libqyoto-dev libqyoto4.4-cil |
|---|
| 10 | |
|---|
| 11 | If you're using a different version of Linux or a different OS, you'll want to |
|---|
| 12 | do something else, and modify the below @ref to point to the appropriate DLL. |
|---|
| 13 | You might be able to remove the @ref entirely; it seem likely that it's only |
|---|
| 14 | necessary because of issues with the Qyoto package in Ubuntu. |
|---|
| 15 | |
|---|
| 16 | Once Qyoto's installed, you can run the program with: |
|---|
| 17 | cobra 394-Qyoto.cobra |
|---|
| 18 | """ |
|---|
| 19 | |
|---|
| 20 | @ref '/usr/lib/cli/kdebindings-4.4/qt-dotnet.dll' |
|---|
| 21 | |
|---|
| 22 | use Qyoto |
|---|
| 23 | |
|---|
| 24 | class 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 |
|---|