Page 2 of 2 FirstFirst 12
Results 21 to 31 of 31

Thread: Deploy a Library

  1. #21
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Deploy a Library

    Hello there,

    I am having problems with the deploying of the lybrary, it work properly if i use the QApplication, but i would like to use QCoreApplication so i have less libraries to deploy. but when i changed to QCoreApplication, the slots are not being called. The run of the thread is called (using start) and exec() of the thread is called within the run, but nothing is happening.

    Is there any reason for this, do i have to stick to QApplication.

    Thanks in advance for the help.

    Cafu

  2. #22
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy a Library

    Hi,


    Should i start a new thread?


    Carlos

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

    Default Re: Deploy a Library

    There has to be something wrong in your code or compilation cycle. QApplication only adds the GUI layer to QCoreApplication.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #24
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy a Library

    Hi wysota,

    it works after i add to the constructor moveToThread(this); i still do not understand exactly what this line does but after that it works with QCoreApplication. Could you explain to me?

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

    Default Re: Deploy a Library

    Quote Originally Posted by cafu1007 View Post
    it works after i add to the constructor moveToThread(this); i still do not understand exactly what this line does but after that it works with QCoreApplication.
    The docs can - QObject::moveToThread().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #26
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy a Library

    ok, i have read then and i dont have it so clear.

    but you confirm that this is what it was missing?, why was working before? QApplication set affinity of the thread or waht was going on?

    i like to get things to work, but i also like to understand how it works....

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

    Default Re: Deploy a Library

    Quote Originally Posted by cafu1007 View Post
    but you confirm that this is what it was missing?
    No, I don't.

    why was working before? QApplication set affinity of the thread or waht was going on?
    I have not seen your code so how could I confirm anything? If it does work after adding moveToThread then you should probably read about thread affinity in Qt and explanations why your code shouldn't look like what it looks like now.

    You can probably start here: You're doing it wrong.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #28
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy a Library

    Is very interesting, so actually i should not make a class to inherit form QThread since the only thing that i need is a exec() to handles the the processing (signals and slots), but with this aproach that is proposed in Threading without the headache then i don need to use mutex and sync why is that??(this is propose there)

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

    Default Re: Deploy a Library

    Again, I have not seen what your code does so I can't suggest an approach. I'm merely pointing out what you are doing wrong. It could be that you don't need any threads at all.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #30
    Join Date
    May 2009
    Posts
    56
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Deploy a Library

    Hi there,

    If use a->moveToThread (thread); the children of a also move to thread or not?

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

    Default Re: Deploy a Library

    Yes, they do.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Has anybody ever able to deploy qt application?
    By Tarun in forum Installation and Deployment
    Replies: 16
    Last Post: 22nd February 2010, 09:08
  2. How to deploy application using shared library in Linux
    By cutie.monkey in forum Installation and Deployment
    Replies: 9
    Last Post: 21st January 2010, 18:41
  3. Deploy on Windows XP ?
    By Anti in forum Newbie
    Replies: 3
    Last Post: 24th September 2009, 21:19
  4. Deploy Qt application on Mac OS X
    By giandrea77 in forum Installation and Deployment
    Replies: 3
    Last Post: 11th February 2009, 09:34
  5. Deploy app under many Mac OS and architecture
    By mourad in forum Installation and Deployment
    Replies: 2
    Last Post: 8th April 2008, 10:31

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.