Example1: show "Hello world" label
1 #include <QApplication>
2 #include <QLabel>
3 int main(int argc, char *argv[])
4 {
5 QApplication app(argc, argv);
6 QLabel *label = new QLabel("Hello World!");
7 label->show();
8 return app.exec();
9 }
|
Example2: connect signal and slot
1 #include <QApplication>
2 #include <QPushButton>
3 int main(int argc, char *argv[])
4 {
5 QApplication app(argc, argv);
6 QPushButton *button = new QPushButton("Quit");
7 QO |

订阅专栏 解锁全文
317

被折叠的 条评论
为什么被折叠?



