[PyQt] python designer plugins cause strange bugs to buttonBoxes

Phil Thompson phil at riverbankcomputing.com
Sun Feb 8 22:44:57 GMT 2009


On Thu, 5 Feb 2009 12:57:10 +0300, Lev Shamardin <shamardin at gmail.com>
wrote:
> Hi all,
> 
> Just discovered a very odd thing: loading Qt4 designer with any plugin
> written in python breaks buttonBox control in an odd way, it sets
> standardButtons property to the "NoButton" value, and it is impossible
> to change this value to anything reasonable.
> 
> This was tested on Fedora 10 box with PyQt4-4.4.4. Steps to reproduce
> the problem:
> 1. Launch designer-qt4, create a dialog with buttons bottom. Press
> Ctrl-R to preview the dialog. You should see a normal dialog with
> buttons Ok and Cancel.
> 2. Launch "plugins.py" from PyQt4-devel-4.4.4/examples/designer/plugins
> 3. Create a dialog with buttons bottom. Press Ctrl-R to preview the
> dialog. Discover that the buttons are missing.
> 4. Close the preview, select the buttonBox, find standardButtons in
> properties, try to change anything. It does not work.
> 
> Can anyone else reproduce this bug? Are there any known workarounds?

Should be fixed in tonight's PyQt snapshot - or at least worked around as
I'm still not sure if it is a bug in Designer or I'm mis-using the
meta-type system.

PyQt registers QDialogButtonBox::StandardButtons (which is a flag type) as
a meta-type. Unregistering it fixes the problem.

Phil


More information about the PyQt mailing list