2009年9月24日 星期四

ui

如要在.cpp中使用Qt Creater新建出來的元件
在使用的程式碼要用ui->元件名稱.......
如:在Qt Creater中拉出一個名叫Label_time的QLabel元件
要在Label_time中顯示"Hello"
程式碼要寫成:

ui -> Label_time -> setText("Hello");

2009年7月14日 星期二

Failure to open file: xxxxx/xxxxx/Makefile

the permission of the /opt directory was denied .....

save your project in your home directory

OpenGL缺少GL/gl.h

Compile OpenGL程式時缺少GL/gl.h時
安裝 libqglviewer-dev

2009年6月30日 星期二

"cannot find -lgobject-2.0" 錯誤訊息

發生 "cannot find -lgobject-2.0" 錯誤訊息

apt-get install libavahi-gobject-dev

安裝 libavahi-gobject-dev即可

"cannot find -lfreetype" 錯誤訊息

發生"cannot find -lfreetype" 錯誤訊息時

apt-get install libfreetype6-dev

安裝libfreetype6-dev即可

"g++:command not found" 錯誤訊息

build 出現"g++:command not found" 錯誤訊息,
可能為gcc未安裝

apt-get install g++ 即可

"No valid Qt version set. Set one in Tools/Options" 錯誤訊息

build時出現 "No valid Qt version set. Set one in Tools/Options" 錯誤訊息的解決方法:

1. 到 Tools → Options → Qt4 → Qt Versions
2. 在裡面新增一個 Qt Version
3. 指定Qt所安裝的路徑,如 "/opt/qtsdk-2009.03/qt"
4. Default Qt Version選擇剛才新增的 Version Name

重新開啟Qt即可