在路上

 找回密码
 立即注册
在路上 站点首页 学习 查看内容

Hello Qt

2016-12-20 13:14| 发布者: zhangjf| 查看: 536| 评论: 0

摘要: 出自《C++ GUI Qt 4 编程》第2-3页Hello Qt #include QApplication#include QLabelint main(int argc, char *argv){ QApplication app(argc, argv); QLabel *label = new QLabel(h2iHello/ ...
出自《C++ GUI Qt 4 编程》第2-3页
Hello Qt
  1. #include <QApplication>
  2. #include <QLabel>
  3. int main(int argc, char *argv[])
  4. {
  5. QApplication app(argc, argv);
  6. QLabel *label = new QLabel("<h2><i>Hello</i> "
  7. "<font color=red>Qt!</font></h2>");
  8. label->show();
  9. return app.exec();
  10. }
复制代码
  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 Qt!");
  7. label->show();
  8. return app.exec();
  9. }
复制代码

最新评论

小黑屋|在路上 ( 蜀ICP备15035742号-1 

;

GMT+8, 2025-7-8 05:44

Copyright 2015-2025 djqfx

返回顶部