Results 1 to 3 of 3

Thread: Threads in Designer plugins

  1. #1
    Join Date
    Mar 2006
    Posts
    74
    Thanks
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Threads in Designer plugins

    I have a designer plugin that I would like to add sound to and the sounds need to run in a separate time critical thread. I tested the code (paint event, sound thread) in a test app before migrating this to a plugin. For some reason I have to disable the thread code to get the plugin to load in designer. If I place the class declaration for the sounds QThread in the header file for the plugin designer gives me a segmentation fault. If I move the class declaration for the sounds QThread from the header file into the implementation file designer will open but the plugin does not show up and looking in Help -> About Plugins it says that it can't load the plugin because "undefined symbol: _ZTV10tickThread". I have declared tickThread as:

    Qt Code:
    1. class tickThread : public QThread
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    6. virtual void run();
    7. };
    To copy to clipboard, switch view to plain text mode 

    I can't find anything on-line about using threads in a plugin other than some older Qt documentation that indicates that it was possible to do in Qt 3.x. Anyone know what needs to be done to use threads in designer 4.x plugins?

    I guess I can always add the sound thread to the main application but I would like to understand why I am having issues with it in the plugin.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,365
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Threads in Designer plugins

    Did you implement a constructor for this class?

  3. #3
    Join Date
    Mar 2006
    Posts
    74
    Thanks
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Threads in Designer plugins

    Yes I do. It turns out that it was not threads that were causing the problem but rather that I was using phonon in the plugin to create sounds. After I made the phonon related bits conditional so that they would not be compiled as part of the plugin but would be build otherwise the plugin started working in designer.

Similar Threads

  1. Qt Plugins Error
    By nathanpackard in forum Qt Programming
    Replies: 1
    Last Post: 17th August 2007, 23:19
  2. Replies: 6
    Last Post: 14th April 2007, 07:59
  3. Replies: 15
    Last Post: 25th March 2007, 03:40
  4. Designer log messages while loading plugins
    By cocheci in forum Qt Tools
    Replies: 3
    Last Post: 18th May 2006, 14:50
  5. Arthur Plugins demos and designer
    By antonio.r.tome in forum Installation and Deployment
    Replies: 4
    Last Post: 21st March 2006, 14:01

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.