[PATCH 3/3] Add a slot to mainwindow but amend to use Q_SLOTS

Tomaz Canabrava tcanabrava at kde.org
Tue Apr 9 06:56:25 PDT 2013


It helps if you think `I`m shifting this left to the output stream.`
Tomorrow night I`ll start the hacking.



2013/4/9 Dirk Hohndel <dirk at hohndel.org>

> amit.k.chaudhuri at gmail.com writes:
>
> > From: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>
> >
> > For some reason, 'private slots:' causes a build error but private
> > Q_SLOTS: works.
> >
> > The error was that 'slots' did not name a type and it appeared to be
> > insensitive to whether the Makefile rule for .moc was in its current
> > place or preceeded the rule for .cpp.
> >
> > Add a slot using the connectByName idiom e.g. actionNew connects to slot
> > on_actionNew_triggered(). Use qDebug to show this fires if the menu
> > option is selected.
> >
> > Above to demonstrate how to begin to link menu to code paths.
>
> I add this to the Qt branch, but it seems of somewhat limited value
> :-)
>
> > +void MainWindow::on_actionNew_triggered()
> > +{
> > +    qDebug() << "actionNew";
> > +}
> > +
>
> By the way: this is a part of C++ syntax that I really dislike... the
> whole streams thing is just ugly.
>
> /D
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130409/8f541b99/attachment.html>


More information about the subsurface mailing list