#include <QtGui>// ----------------------------------------------------------------------int main(int argc, char** argv){ QApplication app(argc, argv); QWidget wgt; QPixmap pix("clock.png"); // QPixmap pix = QPixmap::fromImage(QImage("clock.png")); QCursor cur(pix);app.addLibraryPath(app.applicationDirPath() + "/plugins/"); wgt.setCursor(cur); wgt.resize(180, 100); wgt.show(); return app.exec();}
pal2.setBrush(pwgt2->backgroundRole(), QBrush(QPixmap("stone.jpg")));
app.addLibraryPath(app.applicationDirPath() + "/plugins/");