Can D be cute? (Qt)
Max Samukha
spambox at d-coding.com
Sat May 8 08:45:47 PDT 2010
On 05/08/2010 06:27 PM, Marianne Gagnon wrote:
> Hi Justin,
>
> looking at QtD, it seems like it can be done :
>
> In file http://www.dsource.org/projects/qtd/browser/demos/browser/browsermainwindow.d
>
> m_historyHome.triggered().connect(&this.slotHome);
The example is outdated. Now it's like
connect(m_historyHome, "triggered", this, "slotHome").
>
> // ...
>
> public:
>
> void slotHome()
> {
> // ...
> }
>
> I however believe that this kind of delegate-connection can also be performed in C++ (with templates?). Maybe Qt developers simply continue using the MOC because they don't want to break backwards compatibility.
>
> -- Auria
Here's why they are not using templates
http://doc.trolltech.com/4.5/templates.html
More information about the Digitalmars-d
mailing list