How does Qt implement signals and slots?

Posted by anton on Stack Overflow See other posts from Stack Overflow or by anton
Published on 2010-01-05T17:57:51Z Indexed on 2010/06/10 2:02 UTC
Read the original article Hit count: 472

Filed under:
|
|

Can someone explain to me the basic idea of Qt signals&slots mechanism IMPLEMENTATION? I want to know what all those Q_OBJECT macros do "in plain C++". This question is NOT about signals&slots usage.

added: I know that Qt uses moc compiler to transform Qt-C++ in plain C++. But what does moc do? I tried to read "moc_filename.cpp" files but I have no idea what can something like this mean

void *Widget::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_Widget))
    return static_cast<void*>(const_cast< Widget*>(this));
return QDialog::qt_metacast(_clname);
}

Thanks in Advance, anton

© Stack Overflow or respective owner

Related posts about qt

Related posts about Implementation