Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
treefrogframework committed Nov 22, 2024
1 parent 942b91a commit 6a2db93
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,30 @@ int main()
43 50
```

Qt application can also be run.

```cpp
#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel label("Hello, world!");
label.setAlignment(Qt::AlignCenter);
label.setWindowTitle("Hello");
label.resize(200, 100);
label.show();
return app.exec();
}

// CompileOptions: `pkg-config --cflags --libs Qt6Widgets`
```
```sh
$ cpi helloworld_qt.cpp
```

#### Running like a scripting language
Adding a shebang, save as *hello.cpps*. No longer compiled in a C++ compiler successfully.

Expand Down

0 comments on commit 6a2db93

Please sign in to comment.