tags:

views:

220

answers:

2

QT4 designer doesnot accept '&' reference and ' ' space character in signal/slot editor? As XML schema also doesn't support it ... is there any way to create a custom slot like onClickMyCustorSlot(const QStringList &) using QT4 designer or editing th ui-xml

-Himadri Sekhar

A: 

Although many of the standard Qt classes have signals that use notation containing "const" and "&", normalized versions of these signatures do not contain these. You should be able to create custom slots that only include the class name, and connections made at run-time should work correctly.

That may not be completely satisfactory for your needs, of course. In which case, you might want to file a suggestion for an improvement to be made to Qt Designer:

http://www.qtsoftware.com/developer/task-tracker

David Boddie
+1  A: 

Signals are generally stripped of all & and const. If you connect them in the code you have to use them the same way, in your example like this:

SIGNAL("onClickMyCustomSlot(QStringList)")

Pointers (*), on the other hand, should stay in the signal name.

Georg