Results 1 to 7 of 7

Thread: Compilation problem, don't know why

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Compilation problem, don't know why

    Quote Originally Posted by yellowmat
    Why is it not possible to use slots and signals over distinct threads as you told me ?
    From Qt docs:
    The Signals and Slots mechanism can be used in separate threads, as long as the rules for QObject based classes are followed. The Signals and Slots mechanism is synchronous: when a signal is emitted, all slots are called immediately. The slots are executed in the thread context that emitted the signal.
    Warning: Slots that generate window system events or use window system functions must not be connected to a signal that is emitted from a thread that is not the GUI thread. See the Qt Library Mutex section above for more details.
    This says you can use them under certain conditions, but this:
    None of the QObject based classes included in the Qt library are reentrant. [...] QObject and all of its subclasses are not thread-safe.
    says that you probably won't be able to meet those conditions.

    If you want to use signals & slots across threads, switch to Qt4 and use queued connections.

  2. The following user says thank you to jacek for this useful post:

    yellowmat (2nd March 2006)

  3. #2
    Join Date
    Jan 2006
    Posts
    162
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    9

    Default Re: Compilation problem, don't know why

    This is a great pleasure to chat with the Qt master you are

    I hope that one day I will be able to help newbies like you do.

Similar Threads

  1. Compilation problem with QSqlQuery::bindValue()
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 18th November 2013, 22:30
  2. MacOS and ibase compilation problem
    By giandrea77 in forum Qt Programming
    Replies: 0
    Last Post: 20th January 2009, 13:04
  3. QT 4.4.1 compilation problem on Windows using nmake
    By operis in forum Installation and Deployment
    Replies: 1
    Last Post: 1st September 2008, 10:08
  4. sub-dir compilation problem
    By Salazaar in forum Newbie
    Replies: 13
    Last Post: 2nd November 2007, 21:48
  5. qt4 compilation problem
    By aegis in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd February 2007, 23:10

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
  •  
Qt is a trademark of The Qt Company.