winCE-不断进步

导航

第一个qt程序

qt desinger的使用

仿照上面视频,完成了第一个qt程序。

1 利用qt designer 完成ui文件

2 添加信号槽消息机制处理用户事件。

3 完成主程序main.cpp.

 

代码
#include "ui_browser.h"
#include 
<QtGui/QtGui>

int main(int argc,char *argv[])
{
  QApplication app(argc,argv);
  app.setQuitOnLastWindowClosed(
true);

  QMainWindow 
*form = new QMainWindow;
  Ui::MainWindow ui;
  ui.setupUi(form);

  ui.textBrowser
->setSource(QString("../html/index.html"));
  form
->show();
  
return app.exec();  
}

 

 

posted on 2010-04-20 09:55  杰奎琳的小猫咪  阅读(258)  评论(0编辑  收藏  举报