zeljko wrote> I noted bug in QCombox_additem, will fix this some day
Pascal interfaces allow default parameter nil
for variant, but the interface library dereferences this parameter -> AV when you do not provide parameter.
Workaround, provide Qvariant. This is not a handicap as the default value is a an automatic allocation of a qvariant anyway and not nil.
I should fix the binding generator to write another pascal interface, but this default parameter stuff is handy for other cases where it does work.
Qt header:
inline void addItem(const QString &text, const QVariant &userData = QVariant());
binding:
void QComboBox_addItem(QComboBoxH handle, PWideString text, const QVariantH userData) {
QString t_text;
copyPWideStringToQString(text, t_text);
((QComboBox *)handle)->addItem(t_text, *(const QVariant*)userData);
}
pasal interface:
procedure QComboBox_addItem(handle: QComboBoxH; text: PWideString; userData: QVariantH = nil); overload; cdecl; external QtIntf name 'QComboBox_addItem';
regards,
Den Jean