QT helloworld
2016-08-10 20:38
465 查看
1.linux 下安装qt
使用ubantu software center 查找qt-creator自动安装。2.不使用设计器实现qt-helloworld(使用代码生成窗口类)##
在qt-creator中按照以下选项新建空的工程:file->new file/project->other project->Empty Qt Project
qt-helloworld主要步骤如下:
1.包含头文件
2.创建管理应用程序的资源的QApplication
3.新建QMainWindow窗口对象
4.显示窗口
5.返回
#include<QApplication> #include <QMainWindow> int main(int argc,char* argv[]) { //创建一个QApplication 对象,管理应用程序的资源 QApplication* qa=new QApplication(argc,argv); //新建一默认窗口类 QMainWindow* qm=new QMainWindow(); qm->show(); return qa->exec(); }
相关文章推荐
- Windows下qt的环境配置及运行一个c++"hello world"实例详细步骤
- 我的第一个Qt程序:使用Qt creator和Qt designer完成"HelloWorld"和计算圆面积的程序设计
- 使用命令行编译QT helloworld 项目
- Windows下qt的环境配置及运行一个c++"hello world"实例详细步骤
- QT Hello World 程序
- QT for hello world
- qt5.9+qtcreator4.3.1 helloworld+添加图标流程
- 菜鸟学QT之一-------------HELLO,WORLD
- Windows下qt的环境配置及运行一个c++"hello world"实例详细步骤
- qt-designer使用教程1--HelloWorld.txt
- 入门Qt——hello, world
- Windows下qt的环境配置及运行一个c++"hello world"实例详细步骤
- Qt tutorial 1 -- hello,world
- Qt Quick HelloWorld以及基本QML解析
- <Linux+Qt> Qt基本Hello,World解释
- Windows下qt的环境配置及运行一个c++"hello world"实例详细步骤
- qt 编程 hello-world
- QT for Android HelloWorld实现
- Linux平台下Qt应用程序开发之Hello world
- Cannot find file: g:\QT文件夹\QT工程文件夹\A\helloworld\helloworld.pro.