[PyKDE] Two issues with QT Designer 3.3.0 and PyQt 3.8.1

Welch, Donald J donald.welch at hp.com
Wed Apr 28 22:55:01 BST 2004


I am having two issues with PyQt 3.8.1 and QT Designer 3.3.0:

1. Versioning problem in .ui files:

QT designer is writing its version in the .ui files as '3.3.0'. PyQt
will not accept this as a valid verion unless I remove the trailing
zero, making it '3.3'. The error message is: 'pyuic: File generated with
too recent version of Qt Designer (3.3 vs. 3.3.0)'. Right now, I am
getting around this issue by running a sh script that runs sed to edit
the file before running pyuic. Is there a fix for this?

2. Embedded QLabel pixmaps causing errors:

When I embedd a PNG into a QLabel in a form and set the form up to
inline the data, I get either a segmentation error when I run pyuic or
the error 'ValueError: invalid \x escape' when I try to import the
resulting .py file (if pyuic doesnn't crash). Here is a copy of the
image data:

image0_data = \
    "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
    "\x49\x48\x44\x52\x00\x00\x00\x61\x00\x00\x00\x60" \
    "\x08\x06\x00\x00\x00\x0d\x5a\x1c\x06\x00\x00\x08" \
    "\x98\x49\x44\x41\x54\x78\x9c\xed\x5d\x69\x92\xf4" \
    "\xa8\x0e\x4c\x26\xde\xbd\xcc\xcd\x8a\xbe\x19\x3e" \
    "\x99\xe7\x47\x59\x55\xb2\x40\x20\x30\x2e\x2f\xf3" \
    "\x32\x62\xc2\x5d\x8b\x31\x9f\x92\xd4\x06\xdd\xe3" \
    "\x62\x8c\x78\x12\x62\x8c\x8b\xf7\xde\x9d\x3d\x8f" \
    "\x16\xfc\x73\xf6\x04\xfe\x8f\x93\x48\x98\xa6\x69" \
    "\x69\xb9\xc6\x18\x93\xd7\x31\xc6\x45\xfb\xfe\xdd" \
    "\xf0\x33\x12\xb8\xa1\xe6\x79\x6e\xba\xd2\x7d\x7f" \
    "\x7f\x7f\xe4\x6e\xf0\x7a\xbd\xc0\xbe\xe7\x00\x60" \
    "\x9e\x67\xf7\x7a\xbd\xe0\xbd\xbf\x15\x19\x87\x90" \
    "\x90\x5b\xa1\xc2\xb0\x68\xb9\xbe\x5e\x2f\xfc\xfd" \
    "\xfd\x61\x3.\x3.\x0.\x0.\x00\xbd\xef\xe8\xca\x9f" \
    "\x45\xaf\xef\x84\xdd\x24\x18\x0c\xde\x65\x78\x79" \
    "\x05\xc0\x5f\x7f\x56\xfe\x9d\x8d\x4f\xd8\x45\xc2" \
    "\x51\x06\xcf\x5d\xd7\xe7\x3d\x62\xe5\x4b\x74\x93" \
    "\x70\xa4\xc1\x2b\x4a\x78\x8c\xf1\x09\x26\x12\x64" \
    "\xd6\x71\x34\x01\x00\x92\xab\xf7\x1e\x31\xc6\x47" \
    "\x19\x9f\x50\x25\x21\x97\xa5\x1c\x6d\xf8\xff\x1a" \
    "\x8a\x24\x64\x0c\x3e\x94\x00\xe0\xbf\x6b\x78\x0e" \
    "\x95\x84\x5f\xb8\x9c\x16\x3c\xad\xbd\xc2\xf1\xbf" \
    "\xdc\x9b\x57\x71\x39\xdc\xf0\x54\x2b\x3c\x11\x09" \
    "\x09\x57\x70\x39\x64\x7c\x56\x15\x7f\xc6\x98\x58" \
    "\x85\xfc\x14\x6c\x48\x38\x82\x80\x16\x90\xf1\x59" \
    "\x55\xbc\xb9\x3e\xd5\x25\x6d\x48\xa0\x0a\xf4\x4c" \
    "\x97\xa3\x15\x69\x84\xb5\x7d\xf1\x28\x35\x0c\x55" \
    "\x42\x0b\x34\x97\x23\x0d\xff\xd4\x38\xc0\xe1\xa4" \
    "\xc4\x5b\x89\x68\x45\xcd\xe5\x00\x36\xc3\xaf\xe4" \
    "\x65\xd5\xe0\xbd\x5f\x62\x8c\xb7\x51\xca\x2e\x25" \
    "\xb4\xc0\xb2\xf2\x6b\xc6\x0f\x21\x20\x84\x50\x7b" \
    "\xce\xad\xda\xd8\x80\x20\x81\xda\xc5\x23\x09\xd0" \
    "\x56\x3e\x19\xdc\x12\x6c\x73\x86\x97\xb1\xe1\x8e" \
    "\xc6\x27\x24\x29\xea\xa8\xa0\xab\xad\xfc\x18\x23" \
    "\x62\x8c\xf0\xde\x03\xa8\x2b\xa0\x75\xe5\x87\x10" \
    "\x70\x27\x57\x04\x08\x12\xbc\xf7\x8e\x6d\x25\x0e" \
    "\x5d\xf9\x44\x00\x19\x9f\x9e\xa1\x11\x50\x33\x3e" \
    "\xf0\x5e\x10\x54\xc4\xd1\xf7\xef\x46\x00\x90\x89" \
    "\x09\x31\xc6\x2e\x02\x4a\x3e\x9f\x0c\xcd\x57\x3f" \
    "\x90\x0f\xc0\xd2\xf8\x9c\xd4\xdc\x33\xa7\x69\xba" \
    "\xe5\xea\xe7\xc8\x66\x47\x3c\x36\xd4\xa0\xad\x7c" \
    "\x02\x8d\xc5\x61\x5d\xfd\x72\x6e\x44\x04\xff\x9e" \
    "\xf7\x9e\xda\xdc\xcf\x21\x01\xf8\x9c\xdd\x29\xde" \
    "\x58\xcb\x76\x5a\xf2\xfb\x9a\xf1\x25\xbc\xf7\x9b" \
    "\x7b\x5e\xaf\x17\x9c\x73\x59\x22\xa6\xc9\x2f\xf3" \
    "\x7c\x6d\x82\x36\x24\xf0\xbe\x8c\x46\x84\x65\xe5" \
    "\x5b\xd1\x6a\x7c\x0e\x0b\x11\x2b\x01\x98\x26\x8f" \
    "\x2b\x13\x91\x55\x02\x90\x92\x70\xe6\xca\xd7\x20" \
    "\xdd\x53\x81\x88\xcb\x12\x00\x28\xad\x6c\xe0\x9b" \
    "\x29\xd1\xb6\x62\x6e\xe5\x5b\x0a\x2c\x42\x2e\xdb" \
    "\xd9\xdb\x90\xe3\xaa\x0c\x21\x24\x31\x8c\x29\xe1" \
    "\xd2\x44\xa8\x24\x10\xb8\xc1\x7b\x56\xfe\x08\xe3" \
    "\xd7\xb2\x34\x5a\x24\x6b\x96\x04\xef\xfd\xb2\x2c" \
    "\x00\x73\x45\x97\x26\xa2\x4a\x82\x96\x6e\xd6\x60" \
    "\x31\x3e\xa9\xcc\x32\x87\x1a\x24\x11\xce\x79\x2c" \
    "\x8b\xc7\x23\x62\x42\x2b\x01\xd6\x95\x2f\x83\xfe" \
    "\xa8\xbd\x02\x22\x82\x52\x57\xa1\x88\x4b\x12\xa1" \
    "\xa6\xa8\xc0\xb6\xb8\xea\x69\x2d\x58\x52\x4d\xeb" \
    "\xf7\x5b\x0a\x47\x1a\x97\xd4\x71\x75\x22\x8a\xee" \
    "\x48\xb6\x19\x08\x86\x7e\x8e\xe9\xe1\x72\x7c\x6e" \
    "\x3c\x89\xde\xd6\x89\x70\x4d\x97\x23\x00\x30\xc4" \
    "\x04\x82\xa5\x97\xd3\xe3\x52\x72\x6d\x09\x2d\x56" \
    "\xb4\xa8\x61\x9a\x26\x2c\xcb\x02\xe7\x1c\x42\x08" \
    "\x70\x2e\x60\x59\xae\x19\x9c\x4d\x27\xf0\xe6\x79" \
    "\xc6\xb2\xe8\x9d\x62\xea\x8c\xee\x81\xbc\x5f\x53" \
    "\xc3\x34\x4d\x9b\xe2\x90\x83\x3e\x9b\xa6\x09\xce" \
    "\x39\x38\xf7\xb5\xf7\x9b\x88\x77\xda\xba\x6b\xa2" \
    "\x07\xa0\xaa\x04\xcd\x25\xd1\x67\x23\x41\xe3\xf1" \
    "\xab\x7c\xb6\x24\x82\x9d\xc2\x30\x6d\x0a\x5d\x51" \
    "\x11\x66\x77\xc4\x31\xda\xf8\x12\xb5\xbe\x15\x07" \
    "\xaf\x5b\x64\x85\xaf\x8d\x33\x92\x80\x11\xf5\x47" \
    "\x42\x42\x2c\xec\x50\x1d\x6d\x7c\x2b\x72\xfd\x2a" \
    "\xd9\x26\xd7\xb0\xa6\xaf\x43\xf6\xa0\x47\x15\x80" \
    "\x9b\x98\x50\x6a\xda\xc9\x7f\xf8\xd9\x20\x37\x94" \
    "\x23\x20\x17\x0f\x24\xf6\xc6\x06\xde\x12\xd9\x33" \
    "\x0e\x50\xd8\x59\xbb\x3a\x28\x06\x50\x41\x09\xe0" \
    "\x63\xf8\x9c\xd1\xf9\x7b\x6b\xdd\xd0\xbc\x82\x69" \
    "\xe5\x8f\xee\xce\x6e\x48\xe0\x0d\x3b\x09\x7a\xaf" \
    "\xf7\xa8\x4b\x2f\xf8\x5c\x4a\xb1\x82\x52\xd1\x12" \
    "\x28\xc1\xeb\xe9\x25\x89\x66\xe0\xd0\xc2\x6f\xe3" \
    "\x8e\x56\x25\xec\x1a\x50\x66\x38\x23\xc6\x02\xb6" \
    "\x04\x48\x15\x68\x04\x68\x47\x64\x78\x53\xaf\xf4" \
    "\x7c\xfa\x5c\x18\xde\x7c\xbf\x15\x1b\xa3\x97\x94" \
    "\x40\xe0\xfd\x24\x0b\x4a\x59\x4a\xed\x3e\xfe\x4c" \
    "\x82\x85\x00\x7a\x4d\xb5\x0d\xb9\x29\x59\xea\x94" \
    "\x56\x72\xc1\xf0\xc3\x5b\x20\xc9\xca\xaf\xc5\x04" \
    "\x1e\x04\x5b\x0f\x01\xf4\x90\xc1\xc1\x09\xc8\xed" \
    "\x37\xd3\x6b\xad\xb0\x74\xce\x15\x89\x50\x7c\xfe" \
    "\xe1\x44\x24\x4a\xb0\xdc\xb4\x97\x88\x56\x75\xf0" \
    "\x5a\x80\x8c\xce\xaf\xdc\xed\x94\x2a\x7b\x40\x57" \
    "\x05\x90\xec\x3f\xfc\x84\x00\x20\x43\x82\xe5\xa8" \
    "\x21\xd0\x47\xc4\xfa\x0c\x33\x11\x35\xe3\x73\xd4" \
    "\x8c\x2f\x91\x53\x05\xd0\x44\xc4\xb0\x82\x2f\x4b" \
    "\x02\xa1\x46\xc6\x68\x22\x64\x1d\x42\x6d\x08\x5a" \
    "\x18\xaf\xd2\x7c\x1a\x49\x00\x8a\xb1\xe2\xf7\x4a" \
    "\x60\xfb\x07\x9b\x41\xbd\xf7\xcb\x51\x44\x70\x68" \
    "\x5b\xa6\xd2\xe5\xec\x4a\x45\x0a\x24\x29\xb1\xe2" \
    "\x77\x4a\x08\x21\x14\xff\x3e\x90\x5f\xff\x58\x47" \
    "\x89\x0c\x2b\x11\xb5\xfd\xe9\x77\xc6\xe3\x41\xc5" \
    "\xae\x24\xa1\xa8\x84\x12\x0c\x2a\xc9\xa9\xe2\xb4" \
    "\xec\x48\x43\x4d\x15\x35\x22\x72\xc7\x21\xb5\x31" \
    "\x54\xbf\x6f\x9a\x29\xbf\xa1\xcf\x45\x19\x63\xc5" \
    "\x31\x31\xa1\x86\x5e\x22\x78\x6a\xc9\xdf\xdb\x4c" \
    "\x84\xe5\xfb\x6a\xd0\x75\xc6\x7f\x77\x87\xf1\xe5" \
    "\x5c\x2a\x44\x0c\x6d\x83\x37\x57\xc8\x35\xf7\x24" \
    "\x89\x90\x04\xe4\x8c\x4f\xe3\x25\x31\x80\x5b\xc2" \
    "\x4a\x00\xb0\x9b\x04\x3e\xaf\x42\xac\x38\x47\x09" \
    "\x1c\x25\x55\xc8\x03\x02\x39\x02\x64\xb3\xad\x9a" \
    "\xef\xb7\x90\x40\x18\x44\x46\x4b\xa5\xdd\xf5\x8c" \
    "\x3d\x3d\x1e\x0b\x11\x04\xad\xd3\x69\xce\xf7\x7b" \
    "\x48\xf8\x0e\xda\x7f\x2f\xd4\xa0\x4d\x95\xf5\xd8" \
    "\xfd\x84\x56\xc4\x18\x5d\xed\xb8\x0b\xdf\x7f\x76" \
    "\xce\x21\x20\x24\xab\x1e\x78\x1b\xdf\x5c\x70\x2d" \
    "\xcb\xf6\xbf\x1a\xf6\x10\xc8\xe6\xc6\x87\xe1\xcd" \
    "\xbd\x9e\xeb\x66\x7a\x23\xba\x9d\xa5\x38\xb1\x69" \
    "\x08\x06\xc0\x47\x8f\xe8\x23\x10\xca\x7d\x9e\x04" \
    "\xce\x95\x0d\x7e\x9d\xa0\xdd\x9c\xd6\x0e\xf9\x1b" \
    "\x78\x31\x46\xa7\xa9\x82\x57\xc5\x01\x01\xd1\x47" \
    "\xf8\xe8\x3f\x24\xc8\x5d\x30\x15\x35\xe3\xfd\x50" \
    "\x15\xce\xa5\xc3\xec\xa9\xb0\x87\x28\x81\x43\x53" \
    "\x05\x29\x22\x84\x80\x80\xf5\xb3\x20\x77\xbc\x06" \
    "\x6d\xea\x95\x0c\x3d\xea\x19\x68\xae\xb4\xd5\x49" \
    "\x0d\x27\x81\xa0\x05\xed\x34\x10\xaf\x13\x71\xfc" \
    "\xbd\x01\x86\x92\x44\x0c\x34\xfe\xf6\x31\xa6\xae" \
    "\x6c\x51\x7e\x87\x91\x00\xa4\xaa\xf8\xa6\x9f\x62" \
    "\x12\xee\x6d\x78\x2a\xf0\xbc\xf7\xe3\x88\x38\xc8" \
    "\xf8\xe9\xa3\xfa\x0b\xbc\x43\x49\x20\x10\x19\x31" \
    "\x6e\x25\x0a\x7c\x09\xe0\x98\xe7\x79\x1c\x11\x3f" \
    "\x44\xcf\x0e\x1e\xd0\x79\xf8\xab\x15\x74\xc6\x87" \
    "\xef\x58\x11\x96\x85\x4f\xfe\x3d\xfb\x69\xfd\xb3" \
    "\x3a\xf2\xfd\xab\x83\x6f\xa7\xb6\x4c\xf9\xf0\x3f" \
    "\xd3\xac\x6d\x96\x13\x48\x09\x74\x78\xf7\x7b\xdf" \
    "\xf4\xa9\x31\x4c\xd9\xd3\x85\xa0\xd5\x14\x1a\x0e" \
    "\x55\x82\x72\x4c\xa4\xa8\x04\xfe\x33\x55\xd9\x77" \
    "\x55\x85\x55\x11\x87\x91\x60\xd9\x2c\x07\xb6\x31" \
    "\xe1\x3d\xe9\xf4\x67\x52\x85\x7c\xff\xaa\x28\x65" \
    "\x4c\x39\x1c\x42\x82\x95\x00\x9a\xa8\xa6\x04\x49" \
    "\x04\x70\x6d\x55\xf4\x06\xe6\xc3\xb2\x23\x71\x7c" \
    "\x24\x7b\x4d\x26\x93\x51\x45\xce\xe0\xc3\x53\xd9" \
    "\x01\x58\x7f\x7f\x1a\xc0\xb7\x79\x29\x1b\x7e\xea" \
    "\xbd\x67\x9e\xb4\xd6\x88\x00\x52\x25\xe4\xdc\xd0" \
    "\x15\x52\x59\x5a\x24\x71\xfd\x63\x27\xf2\x33\x0b" \
    "\x11\x3f\x49\x51\x35\xc8\x83\x57\x00\xaf\xa0\x53" \
    "\x25\x5c\x29\x95\xe5\xc6\xa7\xb9\x48\x58\x83\xf3" \
    "\xa9\x4a\x90\x90\xca\xb0\x04\x6d\xe0\xb7\xee\xc9" \
    "\x62\x7c\xfe\x3d\x4b\x7c\xb8\x14\x09\x40\x9e\x08" \
    "\x20\x1f\xb4\xe9\x67\x02\xb9\x27\xf9\xfe\x28\x70" \
    "\xbf\x5f\x37\x7e\x5a\xb8\xf1\x16\x06\xdf\x10\xba" \
    "\x14\x09\xb9\x8a\x9a\x70\xa6\x2a\x4a\x7e\x5f\x7e" \
    "\xcf\x70\x08\x39\xe9\xae\x9e\x1a\x13\x38\x4a\x05" \
    "\x1d\xd0\x9f\xca\xee\x21\xa2\xdd\xf5\xa4\x0a\x55" \
    "\x94\xb0\x51\xc4\x65\x95\x50\x22\xa4\x25\x95\xed" \
    "\x71\x4f\x3d\xc6\xe7\x73\xd9\x7e\xb6\xbd\x27\xd7" \
    "\x55\xbd\xb4\x12\x5a\x0a\xbc\x51\x95\x76\xaf\xdf" \
    "\xe7\x73\xa1\x39\x4a\x68\x6d\xed\x4b\x90\xd0\xf2" \
    "\xfb\x00\x04\x6b\x2a\x6b\xad\xb4\xf7\xf9\xfd\x7a" \
    "\xf7\xb4\x74\x3a\xe3\x74\x77\xd4\xf8\x0b\x19\xc3" \
    "\x83\xf6\x28\xbf\xff\x7e\xbd\xbd\xe7\x12\x3b\x6b" \
    "\x56\xf4\x10\x21\x5b\x1f\xa5\x54\x56\xab\xb4\x81" \
    "\x63\xfc\xfe\xfb\x19\xf6\x93\x7a\xa7\x93\xd0\x48" \
    "\x40\x22\x69\x4b\x81\x57\xea\x3f\x8d\xf6\xfb\xef" \
    "\xb1\xdb\x8e\x4a\x9e\xde\x3b\xea\x31\x7c\x6e\x1c" \
    "\xfe\xba\xa5\xff\x94\x43\x8f\xdf\xdf\x73\x7c\xfe" \
    "\x34\x12\x2a\x04\x74\x1d\x31\xd4\x54\x51\xab\xb4" \
    "\xbf\xdf\x6f\xf7\xfb\xc0\xfe\xdf\x63\x38\xed\xff" \
    "\xc7\xbc\x1a\x5a\x1a\xfe\x33\xe1\x11\x67\x3c\x29" \
    "\x95\xe5\xdb\xa7\xb9\xad\x54\x3a\x80\xa6\x7d\x8f" \
    "\x56\xbf\xe8\x88\x7e\xae\x7b\x08\x00\x4e\x24\x81" \
    "\xed\x2b\x0c\x31\x3c\x29\x6b\x1d\xe7\xf3\x3e\x11" \
    "\xc1\xe3\x43\xee\x67\xfd\xb3\x5d\xbf\xd3\x56\xdd" \
    "\x5f\x06\x4e\x72\x47\x3d\xae\xa6\x61\xdc\xa6\x4a" \
    "\x9b\x7e\x06\xcc\xf9\x7e\x73\x16\x57\x9b\xf7\x29" \
    "\x4a\xf8\x15\x01\x5c\x11\x40\x59\x15\x72\xf5\x8b" \
    "\xf9\x7e\xe6\x2d\x5c\xe7\x7d\x95\x70\x14\xac\xbd" \
    "\x27\x20\x55\x05\xd0\x9e\xef\x8b\x2d\xdb\x6e\x45" \
    "\x9c\x16\x13\x46\xa3\x66\x08\x89\xad\x2a\x4c\x59" \
    "\x4f\xf2\x0d\x1e\xcb\x6e\x99\x1d\x8d\x86\xd5\x10" \
    "\xdc\x20\x5a\xd0\xa5\x6b\x8b\x21\x2b\xae\xaa\xe8" \
    "\x92\x1e\xe3\x8e\x6a\x75\x47\xee\xfb\xf2\xbd\x3d" \
    "\xc1\xd5\x38\x9f\xec\x38\x8f\x20\xa1\x95\x80\xa3" \
    "\xc7\x11\xe3\x55\x0b\xcf\x47\x90\x00\xb4\xad\xbc" \
    "\x5f\x8c\xa3\x8c\x9b\x1d\xe7\x11\x31\x41\x18\xce" \
    "\x5d\x8d\x00\xa0\x9c\x96\x3f\x4d\x09\xa3\x56\xec" \
    "\x50\x02\x6a\x78\x92\x12\x86\xad\xd8\x96\x42\x6b" \
    "\x04\x1e\xa3\x84\xd1\x38\xaa\xb5\x92\xc3\x23\x94" \
    "\x30\x1a\xbf\x24\x00\x00\xfe\x05\xfe\x84\x50\x1f" \
    "\x66\xdb\xaf\x8e\x00\x00\x00\x00\x49\x45\x4e\x44" \
    "\xae\x42\x60\x82"

Darned if I can figure out what the problem is, it looks OK to me...

I can supply a copy of the .png separately if that would help.

Any ideas?

Thanks,

Don





More information about the PyQt mailing list