File tree 4 files changed +34
-1
lines changed
4 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,15 @@ finally run `./main` to see the ultimate answer:
17
17
42
18
18
19
19
## go programs
20
- ## qt programs
20
+ ## qt program
21
+
22
+ this example features a qt5 console application ` console ` :
23
+
24
+ run ` cd qt-program ` and ` nix-shell ` to get a qt5 including environment. afterwards
25
+ run ` qmake ` and ` make ` to generate the console binary. finally run ` ./console ` to obtain:
26
+
27
+ hello beautiful world, from #cccamp2015!
28
+
21
29
## perl
22
30
## python
23
31
enter environment by typing ` nix-shell ` in ./python-program
Original file line number Diff line number Diff line change
1
+ QT += core
2
+ QT -= gui
3
+
4
+ TARGET = console
5
+ CONFIG += console
6
+ CONFIG -= app_bundle
7
+
8
+ TEMPLATE = app
9
+
10
+ SOURCES += main.cpp
Original file line number Diff line number Diff line change
1
+ with import <nixpkgs> { } ;
2
+
3
+ stdenv . mkDerivation rec {
4
+ name = "myprogram-${ version } " ;
5
+ version = "0.0.1" ;
6
+
7
+ buildInputs = [ qt53 ] ;
8
+ }
9
+
Original file line number Diff line number Diff line change
1
+ #include < QDebug>
2
+
3
+ int main (int argc, char *argv[]) {
4
+ qDebug () << " hello beautiful world, from #cccamp2015!" << endl << endl;
5
+ return 0 ;
6
+ }
You can’t perform that action at this time.
0 commit comments