Results 1 to 2 of 2

Thread: A problom about use qt Resource as independ dll

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question A problom about use qt Resource as independ dll

    hi,
    I want put all my application images in a qt plugin dll(all images as qt resource in the dll), how can i use these images which store in the all all after load the images dll as a qt plugin in other qt application. i.g Is there qt4 has api can load image resouce for a dll?
    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A problom about use qt Resource as independ dll

    I think the easiest way to do that is add a load function to your DLL (exported of course and preferably available as C symbol) in which you'd place the proper Q_INIT_RESOURCE macro(s) and then call that function from your program using QLibrary.

    If, as your post suggests, the plugin uses Qt plugin API the loading could (and for simplicity's sake should) be done in a method of the plugin class.
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. resource file name problem in generated code
    By acpRobert in forum Qt Tools
    Replies: 0
    Last Post: 26th April 2009, 02:06
  2. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 12:20
  3. How to include qrc resource file in Visual Studio 2005?
    By jambrek in forum Qt Programming
    Replies: 18
    Last Post: 8th February 2008, 18:26
  4. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  5. How to make Resource only DLL on LINUX?
    By Shuchi Agrawal in forum General Programming
    Replies: 0
    Last Post: 31st May 2007, 06:32

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.