初学QT编程

/* File Name: hello.cpp
* 编译运行命令:
* qmake -project :生成hello.pro文件
* qmake hello.pro :生成Makefile文件
* make :编译生成hello.o文件
* chmod +x hello.o :添加可执行权限
* ./hello :运行程序
*
* 运行结果:在桌面弹出一个小窗口,里边有个“Hello Qt!”。
*/

程序代码居然在Wordpress里贴不成,提示 Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
试了好几个标签,结果都没能屏蔽。如果需要看源程序,请看网站:
http://blog.csdn.net/iamdbl/category/275004.aspx?PageNumber=6

Ubuntu QT4的安装:
sudo apt-get install qt4-dev-tools qt4-designer qt3-assistant python-qt4 qt4-examples

我安装的时候没有qt4-examples这个包,不过应该是一些例子,应该不会影响软件正常使用。注意通过apt安装程序如果没有安装包时,想要考虑源的配置和网速问题,还的注意程序名是否正确,是否需要具体的参数之类。可以用命令如:
sudo apt-cache search qt4
来查找正确的文件名。

2 thoughts on “初学QT编程

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.