[Qt-interest] auto-connect not working?
Francisco Ares
frares at gmail.com
Sun Jan 17 23:51:15 CET 2010
On Thu, Jan 14, 2010 at 5:57 PM, Alan Ezust <alan.ezust at gmail.com> wrote:
>
> On Wed, Jan 13, 2010 at 6:11 PM, Francisco Ares <frares at gmail.com> wrote:
>
>> Hi guys
>>
>> Before I forget: I'm using v4.6.0, MinGW , Eclipse and the Eclipse
>> Integration plugin, all lattest. Great packages, really good pieces of
>> work.
>>
>> I have a test program based on QWidget, where the main class is derived
>> from the Ui:: interface class, instead of creating an object of that class,
>> something like this:
>>
>> Panel::Panel(QWidget *parent) :QWidget(parent) , Ui::PanelClass()
>> {
>> setupUi(this);
>> ...
>>
>> After creating some more widgets using the "creator" embedded inside
>> eclipse, I've declared, for example:
>>
>> private
>> slot:
>> void on_spinButtonTest_valuieChanged(int i);
>>
>
> That's not spelled correctly.
>
>
>>
>> and implemented like this:
>>
>> void Panel::on_spinButtonTest_valueChanged(int i)
>> {
>> mSpinButtonTestValue = i;
>> }
>>
>> It builds even without warnings, but it doesn't execute, it spans an error
>> dialog.
>>
>
>
>
>>
>> If I declare a diferent slot and connect it by hand, it works just as
>> expected.
>>
>
> From the same class? Or an inherited slot?
>
>
>>
>> Am I missing something?
>>
>
> Q_OBJECT macro perhaps? If so, don't forget to re-run qmake.
>
>
>
Oh, boy! No matter how many times I forgot QOBJECT , I still didn't learn.
Thankyou all
--
"If you have an apple and I have an apple and we exchange apples then you
and I will still each have one apple. But if you have an idea and I have one
idea and we exchange these ideas, then each of us will have two ideas." -
George Bernard Shaw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100117/d75845d1/attachment.html
More information about the Qt-interest-old
mailing list