這個問題用了Qt 兩年可是我一直沒有去嘗試
爬文了一下~沒想到這麼簡單
Qt 資源系統(Resource System),資料來源 .qrc 檔
在VS2008就直接點擊Resource Files裡的.qrc
add 欲加入的圖檔
code:
QPixmap pix(":/AutoSend/sync32.png");
簡單一句就是 .qrc裡存放圖片的路徑 加上 :
參考資料:
http://caterpillar.onlyfun.net/Gossip/Qt4Gossip/QtResourceSystem.html
沒有留言:
張貼留言