1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Backported from 4.9.3, Closes ##697348
Index: python-qt4-4.7.3/pyuic/uic/uiparser.py
===================================================================
--- python-qt4-4.7.3.orig/pyuic/uic/uiparser.py 2010-04-16 06:32:09.000000000 -0400
+++ python-qt4-4.7.3/pyuic/uic/uiparser.py 2013-08-31 16:13:08.538679027 -0400
@@ -181,7 +181,14 @@
elif isinstance(widget, QtGui.QAbstractButton):
bg_i18n = self.wprops.getAttribute(elem, "buttonGroup")
if bg_i18n is not None:
- bg_name = bg_i18n.string
+ # This should be handled properly in case the problem arises
+ # elsewhere as well.
+ try:
+ # We are compiling the .ui file.
+ bg_name = bg_i18n.string
+ except AttributeError:
+ # We are loading the .ui file.
+ bg_name = bg_i18n
for bg in self.button_groups:
if bg.objectName() == bg_name:
|