win7下安装配置Qt4
admin 于 2013年12月16日 发表在 windows软件开发
1. 需要下载的软件包:
(1)Qt安装包:qt-win-opensource-4.8.4-mingw.exe
(2)Qt Creator :qt-creator-opensource-windows-x86-3.0.0.exe或者更高版本
(3)MinGW-gcc440_1(Qt4理论上Mingw必须是此版本)
以上软件包,可在百度网盘提取(地址:http://pan.baidu.com/s/1d6Bp0 )
2. 解压MinGW-gcc440_1(强烈建议解压到C盘),则所得C:\mingw目录文件为:
3. 双击qt-win-opensource-4.8.4-mingw.exe,直接安装(此处强烈建议不要更改默认目录C盘):
4. 双击qt-creator-opensource-windows-x86-3.0.0.exe,直接安装(保持默认C盘):
5. 打开qt-creator,依次打开:工具 –> 选项 -> 构建和运行 ->选择“Qt版本”,设置如下:
6. 建立工程测试环境是否搭建成功:
测试源码:
#include <QApplication> #include <QPushButton> #include <QTranslator> int main(int argc, char *argv[]) { QApplication app(argc, argv); QTranslator translator; translator.load("hellotr_la"); app.installTranslator(&translator); QPushButton hello(QPushButton::tr("Hello world!")); hello.resize(100, 30); hello.show(); return app.exec(); }
测试结果成功,如下:
注意:本站所有文章除特别说明外,均为原创,转载请务必以超链接方式并注明作者出处。
标签:Win7