Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Image Plugin Strangeness

Image Plugin Strangeness

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 792 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SteveBooth
    wrote on last edited by
    #1

    I've been beating my head against the wall now for two weeks on this; time to ask for help.

    I'm trying to create a simple image plugin for a custom file type. I've read everything on the forums, and Google'd extensively, but QT simply won't recognize my plugin. It finds the DLL, and reads it in, and calls the 'keys()' routine in my plugin class, and therefore recognizes my file type, but it dies at that point. Specifically, this line, in 'qimagereader.cpp', at line 290 (in version 4.7.4):

    @ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(QString::fromLatin1(suffix))); @

    Always sets 'plugin' to NULL. The reason it does so is because it thinks that my plugin class, which is defined thusly:

    @ class MskPlugin : public QImageIOPlugin {} @

    Is somehow NOT derived from 'QImageIOPlugin'. It therefore never calls either the 'capabilities, or the 'create' methods in my plugin, (as determined by lines 263-273 in 'qmetaobject.cpp'), and hence the whole thing bombs.

    I've tried everything I can think of to fix this. Can anyone give me a hint of the direction to take? This looks so simple -- and I created the actual 'msk' file decoder in like half an hour. Two weeks later, I'm still trying to get QT to recognize my stupid plugin. I'm using Visual Studio 2010, by the way as an IDE.

    Thanks, in advance, for any and all help!

    Steve

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved