Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2007-07

Drag'n Drop

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi,

Den, is it possible to get QDrag class into bindings ?

tnx.
zeljko

Den Jean
to Unknown author
Den, is it possible to get QDrag class into bindings ?

Done.

See also demo of QStyleFactory in demo MainWindow

I noted bug in QCombox_additem, will fix this some day

regards,

Den Jean

zeljko
to Den Jean
Den Jean wrote
On Monday 23 July 2007 21:36:52 wrote: > Den, is it possible to get QDrag class into bindings ? Done.

tnx :)

See also demo of QStyleFactory in demo MainWindow I noted bug in QCombox_additem, will fix this some day

what bug ?

zeljko

Den Jean
to zeljko
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