这个
问题找了很久都
没有找到有关
资料...是这样的,我的qml需要和
C++做互动,所以要使用QDeclarativeView来查看qml文件,然后现在有个功能需要用XML分析来阅读(RSS),里面有
图片,现在的情况是很多图片出现了Unsupport(好像是png就可以直接
显示),然后同样的qml文件我直接用QMLviewer看就可以看到了,控制台上面有个created new network access manager for QDeclarativePixmapReaderThreadObject。是不是因为我的C++程序没+如这个QDeclarativePixmapReaderThreadObject的支持导致看不到jpg等
格式的图片呢?应该如何解决呢?
+上我的
QDeclarativeView用法:#include <forMove.h>moveQWidget::moveQWidget(QApplication *temp){ setWindowFlags(Qt::FramelessWindowHint| Qt::Tool|Qt::WindowStaysOnTopHint); setWindowOpacity(1); view=new newQDeclarativeView(this); view->rootContext()->setContextProperty("ls",new LS(temp)); view->rootContext()->setContextProperty("serch",new serchSuggest()); view->setSource(QUrl("qrc:/QML.qml")); setAttribute(Qt::WA_TranslucentBackground, true); view->setGeometry(0,20,view->size().width(),view->size().height()); QLabel *move=new QLabel(this); QPixmap *map=new QPixmap("://pic//move.png"); move->setPixmap(*map); move->setGeometry(200,0,42,42);}[ 此帖被followcat在2011-05-09 13:43重新编辑 ]