Results 1 to 3 of 3

Thread: jpeg images on qlabel windows app

  1. #1
    Join Date
    Apr 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default jpeg images on qlabel windows app

    Hi

    I'm trying to deploy an application on windows, the image shows correctly on the development PC, but once I change to another one without the development environment the images are not showed, if i change the image to png, the image is showed correctly.

    What I have done:

    I copy the folder imageformats (with all dlls on it) on the folder where my executable is. (didn't works)

    I create the file qt.conf and create the folder \plugins\imageformats (didn't works)
    the contents fo file qt.conf (located on the application's folder)
    [PATHS]
    plugins=./plugins

    tried also on main.cpp

    QApplication a(argc, argv);
    a.addLibraryPath("./plugins");
    a.addLibraryPath("/plugins");

    Nothing on what I have done worked out.


    On windows I'm using only QT creator (not visual studio)
    the code on the application that calls the image is:

    setWindowIcon(QIcon("owered-opensuse.jpeg"));
    ui->IMG->setPixmap(QPixmap("owered-opensuse.jpeg"));


    The dlls on application folder are:

    QtGui4.dll, QtCore4.dll, mingwm10.dll, libgcc_s_dw2-1.dll

    If I change the image to png it works perfectly.

    Thanks in advance for your help.

  2. #2
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: jpeg images on qlabel windows app

    I had the very same problem. After long searching I found out, that there are 2 occurrences of each of the imageformat dlls in the qt package. The dlls have the same name but a different size - take the bigger ones ;-)
    It might or might not help you, but it's perhaps worth a try.

  3. #3
    Join Date
    Apr 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: jpeg images on qlabel windows app

    Thanks a lot Sedi !!!, you are right its working now.

Similar Threads

  1. Qlabel e jpeg
    By eltecprogetti in forum Newbie
    Replies: 4
    Last Post: 2nd March 2012, 02:26
  2. Printing JPEG images from QTextEdits
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th May 2010, 19:23
  3. Problem with displaying jpeg and gif images, in QT4
    By node_ex in forum Installation and Deployment
    Replies: 1
    Last Post: 23rd September 2008, 15:29
  4. JPEG Images not shown in QiconView using QT3??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 20:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.