Results 1 to 3 of 3

Thread: Deployment glitch on other machines

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Deployment glitch on other machines

    Hi there.
    So my problem is this: I deploy my app (with those 4 dll's included in the release folder) and it works perfectly on my machine. When I run the executable on another system that doesn't have Qt installed it runs without a problem, with one important difference. When I try to open an image file it sees it as null and doesn't add it to my graphics view. This does not happen on my machine. Everything else works well.

    The method for adding the image to the graphics view:
    Qt Code:
    1. void MainWindow::makeImage(QImage image)
    2. {
    3. if (!fileName.isEmpty())
    4. {
    5. pictureScene->clear();
    6. if (image.isNull())//this is where the error occurs, even though I give the image a fileName
    7. {
    8. QMessageBox::information(this, tr("MainWindow"),
    9. tr("Cannot load %1.").arg(fileName));
    10. return;
    11. }
    12. pixmap->convertFromImage(image);
    13. picture = new QGraphicsPixmapItem(*pixmap);
    14. pictureScene->addItem(picture);
    15. }
    16. }
    To copy to clipboard, switch view to plain text mode 

    and the slot for opening the image:
    Qt Code:
    1. void MainWindow::openImage()
    2. {
    3. fileName = QFileDialog::getOpenFileName(this,
    4. tr("Open Image File"), QDir::currentPath());
    5. QImage newImage(fileName);
    6. makeImage(newImage);
    7. }
    To copy to clipboard, switch view to plain text mode 

    So this works as it should on my computer, but for some reason it does not on others. Does anyone have any idea what am I doing wrong, cause I'm lost. Thanks in advance.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Deployment glitch on other machines

    Deploy the image plugins for the format(s) you are using, e.g. qjpeg4.dll, into an "imageformats" directory in the same directory as your executable.

  3. #3
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Deployment glitch on other machines

    Wow, that was simple. Thanks alot. I'm such newb.

Similar Threads

  1. QListWidget graphical glitch
    By skepticalgeek in forum Qt Programming
    Replies: 9
    Last Post: 15th March 2011, 23:34
  2. Phonon Windows TotalTime glitch
    By skepticalgeek in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2010, 22:17
  3. icon glitch in QListView
    By trhaynes in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2009, 19:48
  4. OSX App wont run on other machines
    By December in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 02:23

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.