Professional Development

Pro-D
  • Front Page
  • Contact
  • Log in
  • « QT: learning about namespaces, enums, and writing classes
  • QT work »

QT: Successful portable app with SVG icons

Posted by mholmes on 26 Nov 2009 in Activity log

Finally figured out how to get a Windows executable compiled on one Windows machine to run correctly (with SVG icons) on another Windows VM without QT installed. Here are the steps:

  • Build for release, and take the exe in the release folder of the project.
  • Copy the following files from c:\Qt\[release_date]\qt\bin\ (NOT the \bin\ which is one folder further up the tree):
    • mingwm10.dll
    • QtCore4.dll
    • QtGui4.dll
    • QtSvg4.dll
    into the same folder as the executable. (Make sure you don't get the versions with "d" included; these are the debug versions.) You may need other dlls depending on what you're using.
  • Take the \plugins\imageformats folder from the same location, and copy it into a \plugins\ folder alongside the executable. (This is all that's needed for my simple SVG test app; you may need other plugins too.)
  • Create a text file called qt.conf in the same folder as the executable, and put this in it:
    [Paths]
    Plugins = plugins/
    
    This tells the QT code to look for plugins in this subfolder of the main app. Otherwise it will look for a full QT installation on the target machine, and not find it. Plugins seem to be late-binding, and the app is able to fail gracefully (by not displaying SVG icons) if it can't find the plugins.

This works for an exe compiled on 64-bit Windows 7 or on 32-bit Windows XP, running on a separate 32-bit XP system.

I now have a clean XP VM provided by Greg, with only QT on it, for this kind of task. Now I need to see if I can make a Linux app portable in the same way; then it's Mac time.

This entry was posted by Martin and filed under Activity log.

Professional Development

This blog is used to record research and learning we do which is not part of a specific project, such as learning a new programming language in anticipation of using it for future projects, or installing and testing development tools that may be useful.
  • Home
  • Recently
  • Archives
  • Categories
  • Latest comments

Search

Categories

  • All
  • Activity log
  • Announcements
  • Tasks

XML Feeds

  • RSS 2.0: Posts
  • Atom: Posts
What is RSS?

Recent Posts

  • Expenses claim
  • Another hour on QT
  • A little QT learning
  • Repro training
  • POS tagging tool
  • QT: learning about directory views and models
  • QT: Preparing icon collection for use as a resource
  • QT: learning about namespaces, enums, and writing classes
  • QT: Successful portable app with SVG icons
  • QT work

Sidebar 2

This is the "Sidebar 2" container. You can place any widget you like in here. In the evo toolbar at the top of this page, select "Customize", then "Blog Widgets".

This collection ©2026 by admin • Help • Open-source blog