[SOLVED]QWizard and currentIdChanged signal issue
-
Hello,
QWizard::currentIdChanged doesn't work and it gives me an error message as following:
@QMetaObject::connectSlotsByName: No matching signal for on_WizardAddReflection_currentIdChanged(int)@what's wrong?! could you please help me?
-
Hi mbnoimi,
Is on_WizardAddReflection_currentIdChanged() a slot function of your custom Wizard class?
If so, change the name of the slot to avoid autoconnection, then call connect() by yourself.
Hope this is useful for you.
Regards,
Debao
-
I'm also not a fan of auto-connections. Just do them manually, and you'll have full control over what gets connected to what.
-
[quote author="1+1=2" date="1333063148"]Hi mbnoimi,
If so, change the name of the slot to avoid autoconnection, then call connect() by yourself.
Hope this is useful for you.
Debao[/quote]
Thanks it works manually! I've to report this bug autoconnection should work.
-
[quote author="Andre" date="1333092717"]I'm also not a fan of auto-connections. Just do them manually, and you'll have full control over what gets connected to what. [/quote]
Why you are against the progress?! auto connection made for easing developing process and helping developers to build rapid projects.
-
Hi,
Auto connection is not so good as you imagine, it not "auto":
- First, you write slots following some pattern.
- Then, call connectSlotsByName (to parser the slot pattern, then call connect for each valid pattern)
- ...
If you read the manual carefully, you may have been find the answer why it doesnot work here.
@
void QMetaObject::connectSlotsByName ( QObject * object ) [static]Searches recursively for all child objects of the given object, and connects matching signals from them to slots of object that follow the following form:
void on_<object name>_<signal name>(<signal parameters>);
@Note that: <object name> should be its child object.
Indeed, this is a known bug, as Designer or QtCreator should not show "Go to slot" menuitem when you click the topwidget in designer.
Regards,
Debao
-
[quote author="mbnoimi" date="1333124811"]-
Why you are against the progress?! auto connection made for easing developing process and helping developers to build rapid projects.[/quote]I am not against progress at all, but I like being able to find where slot invokations come from. Naming methods should, IMHO, not have any effect other than the readability of my code (ok, as long as they conform to the C++ naming rules). This function breaks all that, and I don't like that. I'm not stopping from anybody else using it, but I personally prefer not to.