[Qt-interest] qobject_cast Vs dynamic_cast

Ramesh ramesh.bs at robosoftin.com
Fri Oct 22 12:51:22 CEST 2010


There is a brief info about how signal slot are work is given here

http://tokoe-kde.blogspot.com/2010/06/verktyg-or-how-to-tame-signals-and.htm
l





From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of ??
Sent: Thursday, October 21, 2010 12:36 PM
To: Sarvesh Saran; qt-interest at trolltech.com
Subject: Re: [Qt-interest] qobject_cast Vs dynamic_cast



In my opinion, the best way to understand the implementation signals and
slots is to read source code. You can check the marco SIGNALS and SLOTS. The
SIGNALS makes function name to a string. I found Qt maintains a SIGNAL-SLOT
map. In fact, when Qt found an emit keyword, it will change it to the slot
function.

2010/10/21 Sarvesh Saran <Sarvesh.Saran at synopsys.com>

Hi All,



I am trying to understand the differences between the qobject_cast  and
dynamic_cast and the advantages offered by qobject_cast.



According to QT documentation:



The qobject_cast() function behaves similarly to the standard C++
dynamic_cast(), with the advantages that it doesn't require RTTI support and
it works across dynamic library boundaries.



Can someone explain the meaning of the underlined words “it works across
dynamic library boundaries” ?



I have another question,  related to signals and slots. I will appreciate it
if someone can give a conceptual overview of how QT implements signals and
slots internally?  ( the documentation says that we don’t use templates as
certain compilers do not support  advanced templates ). I was just curious
how signals and slots work under the hood.



Thanks!

Sarvesh






_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




--
Cheng Liang
from: chengliang.soft at gmail.com


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101022/5ad9752c/attachment.html 


More information about the Qt-interest-old mailing list