[Qt] V1.66
Den Jean
Den.Jean at telenet.be
Tue Sep 30 22:57:24 CEST 2008
Hi,
V1.66: 30 Sep 2008: QPrinterInfo_availablePrinters
This was a QList<T> where T was not an "int" or "QtClass *", but a "QtClass"
The pascal compiler can ofcourse not deal with such a QtClass, therefore
I needed to copy all QtClass to QtClass* -> So I did "new QtClass()" (call
default constructor), to get a pointer to a QtClass, which is in pascal
QtClassH.
Due to the use of "new" -> you need to delete these classes after use.
New Template copy code used for QPrinterInfo_availablePrinters:
.........
template <typename T>
Q_OUTOFLINE_TEMPLATE void copyQListTemplateToPInts2(QList<T> &qi, PIntArray
pi)
{
int len = qi.count();
PTRINT *ints;
setIntsLength(pi, len);
ints = (PTRINT *)getIntsPtr(pi);
for (int i = 0; i < len; i++)
ints[i] = (PTRINT)(new T(qi[i]));
}
............
regards,
Den Jean
More information about the Qt
mailing list