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. Difference in behaviour between addImportPath and qmlRegisterType
Forum Updated to NodeBB v4.3 + New Features

Difference in behaviour between addImportPath and qmlRegisterType

Scheduled Pinned Locked Moved General and Desktop
qmlimportaddimportpath
1 Posts 1 Posters 687 Views 2 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
    sdrobert
    wrote on 15 May 2015, 16:34 last edited by
    #1

    Hello all,

    Thanks for taking the time. My question is: does importPath differ in the way it loads libraries, compared to qmlRegisterType?

    I have this peculiar segfault which occurs when I import a qml plugin:

    engine.addImportPath("../../../imports"); // contains PocketsphinxDecoderPlugin dir
    

    However, it does not occur when I load the same shared library (minus the qmldir file) via c++:

    #include <pocketsphinxdecoder.h>
    // and in main
    qmlRegisterType<PocketsphinxDecoder>("PocketsphinxDecoderPlugin", 1,0, "PocketsphinxDecoder");
    

    For good measure I tried importPlugin, which didn't work either. Note that the segfault occurs well within the program, between when a function is called and the debugger can step into it. AFAICT, the arguments' contents aren't corrupted. I can provide additional information, but it's rather complicated (the fault occurs in another library). I'm mostly trying to see if this looks familiar to someone before I try and work around it.

    Thank you for your time,
    Sean

    1 Reply Last reply
    0

    1/1

    15 May 2015, 16:34

    • Login

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