[PyQt] QTableWidget - pyuic does not compile several attributes

Phil Thompson phil at riverbankcomputing.com
Fri Jul 29 16:26:53 BST 2011


On Fri, 29 Jul 2011 11:02:05 +0200, "Hans-Peter Jansen" <hpj at urpla.net>
wrote:
> Comparing output from uic with current pyuic4, I noticed, that uic will 
> only set the objectName, if not done already:
> 
>         if (WidgetName->objectName().isEmpty())
>             WidgetName->setObjectName(QString::fromUtf8("WidgetName"));
> 
> That looks useful.

Yes, but given the way pyuic is implemented it's difficult to do.

> From a further cursory look, the IBeamCursor is set on the viewport:
> 
>         tableWidget->viewport()->setProperty("cursor",
>         QVariant(QCursor(Qt::IBeamCursor)));
> 
> instead of:
> 
>         self.tableWidget.setProperty(_fromUtf8("cursor"),
>         QtCore.Qt.IBeamCursor)

Fixed.

> Also note, that properties aren't fed through fromUtf8.

Fixed.

Thanks,
Phil


More information about the PyQt mailing list