I have release my program and package the program with installshield, and installed the package program on another PC that without QT and VS installed, everything is sames fine. I have a dialog to show image, this dialog can show jpg,png and other format image on my developing environment PC, however, it only show png image correctly on the other PC ! I had package the qgif4.dll, qjpeg4.dll and corresponding dlls to my program. the fellowing is my codes, these codes for showing images was rewriten as the QtDemo/SQL/Drill down example.
Qt Code:
  1. // ImageItem.cpp
  2. #include "ImageItem.h"
  3.  
  4. CImageItem::CImageItem( QGraphicsItem *parent, QGraphicsScene *scene)
  5. : QGraphicsPixmapItem(parent, scene)
  6. {
  7. setAcceptsHoverEvents(false);
  8. timeLine.setDuration(150);
  9. timeLine.setFrameRange(0, 150);
  10.  
  11. connect(&timeLine, SIGNAL(frameChanged(int)), this, SLOT(setFrame(int)));
  12. connect(&timeLine, SIGNAL(finished()), this, SLOT(updateItemPosition()));
  13. }
  14.  
  15. void CImageItem::setItem(int w,int h,const QPixmap &pixmap)
  16. {
  17. m_nW = w, m_nH = h;
  18. setPixmap(pixmap);
  19. adjust();
  20. }
  21.  
  22. void CImageItem::hoverEnterEvent(QGraphicsSceneHoverEvent * /*event*/)
  23. {
  24. timeLine.setDirection(QTimeLine::Forward);
  25.  
  26. if (z != 1.0)
  27. {
  28. z = 1.0;
  29. updateItemPosition();
  30. }
  31.  
  32. if (timeLine.state() == QTimeLine::NotRunning)
  33. timeLine.start();
  34. }
  35.  
  36. void CImageItem::hoverLeaveEvent(QGraphicsSceneHoverEvent * /*event*/)
  37. {
  38. timeLine.setDirection(QTimeLine::Backward);
  39. if (z != 0.0) z = 0.0;
  40.  
  41. if (timeLine.state() == QTimeLine::NotRunning)
  42. timeLine.start();
  43. }
  44.  
  45. void CImageItem::setFrame(int frame)
  46. {
  47. adjust();
  48. QPointF center = boundingRect().center();
  49.  
  50. translate(center.x(), center.y());
  51. scale(1 + frame / 550.0f, 1 + frame / 550.0f); // here change the scale
  52. translate(-center.x(), -center.y());
  53. }
  54.  
  55. void CImageItem::adjust()
  56. {
  57. QMatrix matrix;
  58. matrix.scale(m_nW/ boundingRect().width(), m_nH/ boundingRect().height());
  59. setMatrix(matrix);
  60. }
  61.  
  62. void CImageItem::updateItemPosition()
  63. {
  64. setZValue(z);
  65. }
To copy to clipboard, switch view to plain text mode 

and ImageView.cpp is here:
Qt Code:
  1. #include "ImageView.h"
  2. #include "ImageItem.h"
  3.  
  4. CImageView::CImageView(int imgWidth,int imgHight,int offsetX,int offsetY,QWidget *parent): QGraphicsView(parent)
  5. {
  6. m_nW = imgWidth,m_nH = imgHight;
  7. m_pGraphScene = new QGraphicsScene(this);
  8. m_pImageItem = new CImageItem;
  9. setScene(m_pGraphScene);
  10. m_pImageItem->setPos(offsetX,offsetY);
  11. m_pGraphScene->addItem(m_pImageItem);
  12. setRect(imgWidth,imgHight,offsetX,offsetY);
  13. }
  14.  
  15. CImageView::~CImageView()
  16. {
  17.  
  18. }
  19.  
  20. void CImageView::setRect(int imgWidth,int imgHight,int offsetX,int offsetY)
  21. {
  22. int frameWidth = imgWidth + offsetX * 2 + 2;
  23. int frameHight = imgHight + offsetY * 2 + 2;
  24. m_pGraphScene->setSceneRect(0,0,imgWidth+2*offsetX, imgHight+offsetY*2);
  25. }
  26.  
  27. void CImageView::showImage(const QString& szName)
  28. {
  29. if(!QFile::exists(szName))
  30. {
  31. AlarmBox(tr("Image File 【%1】 Not Found!").arg(szName));
  32. return ;
  33. }
  34. m_pImageItem->setItem(m_nW,m_nH,QPixmap(szName));
  35. }
To copy to clipboard, switch view to plain text mode 

when I want to show a image, call showImage(path) instead. and on my main.cpp, I had setted envrionment path like this:
Qt Code:
  1. QStringList pathList=QApplication::libraryPaths();
  2. pathList.append(QDir::current().absolutePath()+"/plugins");
  3. pathList.append(QApplication::applicationDirPath()+"/plugins");
  4. QApplication::setLibraryPaths(pathList);
To copy to clipboard, switch view to plain text mode 
and in the program install folder, the files struct is like this:
D:\PROGRAM FILES\FLOWERDATABASE
│ DatabaseConfig.ini
│ FlowerDatabase.exe
│ Mainframe_zh.qm
│ Microsoft.VC90.CRT.manifest
│ msvcm90.dll
│ msvcp90.dll
│ msvcr90.dll

├─Backup
│ SQL2000_Init.bak
│ SQL2005_Init.bak

├─Config
│ style.txt

├─Database
└─Plugins
├─codecs
│ qcncodecs4.dll
│ qgif4.dll
│ qjpeg4.dll
│ qtiff4.dll
│ qtwcodecs4.dll

└─sqldrivers
qsqlite4.dll
qsqlmysql4.dll
qsqloci4.dll
qsqlodbc4.dll
It's sames everythis is OK, I don't know what's the matter! Anything help is appreciate!