[PyKDE] setOn attribute not supported by pyuic4?

Rick van Hattem Rick.van.Hattem at fawo.nl
Fri Dec 8 00:32:40 GMT 2006


if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    window = QtGui.QMainWindow()
    ui = Ui_main()
    ui.setupUi(window)
    ui.tableView = QtGui.QTableView()
    ui.tableView.setModel(model)
    window.show()
    
    sys.exit(app.exec_())
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart8287515.Ddrtx7zroW";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200612080132.42519.Rick.van.Hattem at fawo.nl>

--nextPart8287515.Ddrtx7zroW
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello everyone,

Today I was playing around with Qt Designer and after creating a few=20
checkboxes I tried to link some of them, all of it worked perfectly in the=
=20
preview but when I tried 'pyuic4 test.ui -pd' it failed.

Could it be that the setOn attribute is not yet supported by pyuic4?

To reproduce the error, create a new file in Qt Designer, choose "Main Wind=
ow"=20
(I'm not sure if that's important, but that's what I used). Create two chec=
k=20
boxes, go to "Edit signal/slot" mode and create a connection between the tw=
o=20
checkboxes. I gave the first checkbox the "toggled(bool)" trigger and the=20
second checkbox the setOn(bool) action.

The traceback:
Traceback (most recent call last):
  File "//usr/lib/python2.4/site-packages/PyQt4/uic/pyuic.py", line 63, in ?
    error =3D previewUi(args[1])
  File "//usr/lib/python2.4/site-packages/PyQt4/uic/pyuic.py", line 17, in=
=20
previewUi
    widget =3D uic.loadUi(uifname)
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/__init__.py", line 93, i=
n=20
loadUi
    return loader.DynamicUILoader().loadUi(uifile, baseinstance)
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/Loader/loader.py", line =
25,=20
in loadUi
    return self.parse(filename)
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 524, =
in=20
parse
    actor(elem)
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 467, =
in=20
createConnections
    conn.findtext("slot").split("(")[0]))
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/objcreator.py", line 68,=
 in=20
getSlot
    return self._cpolicy.getSlot(object, slotname)
  File "/usr/lib/python2.4/site-packages/PyQt4/uic/Loader/qobjectcreator.py=
",=20
line 63, in getSlot
    return getattr(object, slotname)
AttributeError: setOn

=2D-=20
Rick van Hattem	Rick.van.Hattem(at)Fawo.nl

--nextPart8287515.Ddrtx7zroW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFeLKq25UAkonD6zwRAsqJAKDF+7pibUmgmJpY8vHap6FuEKd0nACeOjP9
rk98NtC84OccBsjLT5d2OsY=
=VTD2
-----END PGP SIGNATURE-----

--nextPart8287515.Ddrtx7zroW--




More information about the PyQt mailing list