Results 1 to 10 of 10

Thread: A Hippie Idea

  1. #1
    Join Date
    Apr 2010
    Posts
    148
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default A Hippie Idea

    Hello,

    I was wondering if there is a technical issue if Qt adopts the Boost library Signals instead of the current mechanism where it requires a Qt-specific tool to perform a preprocessing stage which also requires a Qt-specific defined keywords.

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A Hippie Idea

    It seems that Qt's signals are more flexible than Boost, however. Last time I used Boost, the signals were serialised and not thread safe. In Qt, you also have several options for each connection you make - eg, you can define a connection as 'direct' so it isn't queued, but another connection which uses the same signal at a different part of the program can be queued.

  3. #3
    Join Date
    Apr 2010
    Posts
    148
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A Hippie Idea

    So Qt signals are thread safe?

    Well the idea is just to liberate Qt from specific tools/keywords.

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: A Hippie Idea

    Quote Originally Posted by qtoptus View Post
    So Qt signals are thread safe?

    Well the idea is just to liberate Qt from specific tools/keywords.
    ...and shackle it to an external library that is underdeveloped, poorly specified and impossible to port to many compilers? What's the advantage?

  5. #5
    Join Date
    Apr 2010
    Posts
    148
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A Hippie Idea

    I think boost is a pretty mature library and under active development.

    Again the whole idea is to get rid of Q_OBJECT thingy and make it portable without being required(forced) to use Qt-Tools

    Create Qt signal library that is "thread safe" and well developed!

  6. #6
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A Hippie Idea

    Qt is never ever going to use templates for stuff that can be auto-generated. If you wish, you can do without the Q_OBJECT macro. It's just a convenience macro. Not using it implies implementing the QMetaObject yourself, as well as some translation functions.

    If you're wondering why this is, read their statement on using templates for signals and slots.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  7. #7
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: A Hippie Idea

    Boost is a much more heavyweight solution than Qt, and it is far from portable; it simply will not compile in any useful form under many Unix compilers, and quality assurance is, at best, spotty. The latter will probably change once the standards committee actually releases a specification, but given their past performance that is at least a decade in the future.

  8. #8
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A Hippie Idea

    And besides that, the boost api is butt-ugly...
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  9. #9
    Join Date
    Apr 2010
    Posts
    148
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A Hippie Idea

    Understood.

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

    Default Re: A Hippie Idea

    To add to the discussion - Boost signals are "static" in the way that connections are established during compilation whereas in Qt they are established at runtime which gives many different opportunities Boost will never have. For example consider exposing an ActiveX or D-Bus interface on the fly or wrapping an external scripting environment (e.g. Javascript) in signal/slot/property system to connect two different technologies together. You can also "create" signals and slots dynamically for example as shown here: http://doc.qt.nokia.com/qq/qq16-dynamicqobject.html. Also an example of what I did was to allow remote registration for signals that were later passed between applications on different hosts using ActiveMQ bus. I can also imagine implementing dynamic IPC mechanism with signal/slots API although this is sort of what D-Bus already does (I would extend it to RPC though).
    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. ???any one have idea about this ???
    By damodharan in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2010, 10:08
  2. skins idea
    By CopyrightPhilly in forum General Discussion
    Replies: 1
    Last Post: 11th November 2007, 16:16
  3. No idea about QGraphicsView
    By Shawn in forum Qt Programming
    Replies: 2
    Last Post: 27th June 2007, 11:02
  4. UI Idea please
    By munna in forum General Discussion
    Replies: 1
    Last Post: 9th May 2006, 12:14

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.