paip.提高用户体验----c++图片按钮方法总结
作者Attilax , EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
1.new>qt >resource file >>*.qrc
-------------------------------------------
then can auto change in *.pro
RESOURCES += \
picnavbek.qrc
2.add a jpg into from gui ... finaly open with txt editor like this
----------------------------------------------------------------
<RCC>
<qresource>
<file>C:/Documents and Settings/Administrator/桌面/nav2.jpg</file>
</qresource>
</RCC>
3.button>rit key >change stylySheet> add resource >select resource :select the pic.. then floow txt box like this
=============================================================================================
background-image: url(:/C:/Documents and Settings/Administrator/桌面/nav2.jpg);
参考
QT4.6上怎样给按钮加背景图片 - CSDN论坛 - CSDN.NET.htm