[PyKDE] subclassing widgets contained in a QtDesigner form

Boudewijn Rempt boud at valdyas.org
Fri Oct 25 09:40:00 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 25 October 2002 01:35, Michael Ferraro wrote:
> I would like to sub-class a widget (QLabel for example) that I have
> placed (sized, colored, etc.) in QtDesigner in order to overide the
> mouseDoubleClickedEvent() .
>
> I  realize I could modify the class generated by pyuic and
> change the "QLabel" to a "MyLabel" for each occurance
> but did not want to modify the files generated by pyuic
>
> I was wondering if there is some idomatic way of copying all the
> properties of a instance into a new one.without explicitly assigning
> them.
>

You can also create your class and add it as a custom widget to
Qt Designer -- then you can design directly with your MyLabel.

- -- 
Boudewijn Rempt | http://www.valdyas.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9uPS5daCcgCmN5d8RAtqtAKDjHCWmsNRVepNdizsj1Ip9tJVl0ACgy82u
cKE9KiPkoE3BaI3NDHv8F0o=
=p7Ub
-----END PGP SIGNATURE-----




More information about the PyQt mailing list