aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiller Moreira <willer.moreira@indt.org.br>2011-12-14 13:42:08 -0400
committerWiller Moreira <willer.moreira@indt.org.br>2011-12-14 14:20:55 -0400
commite9df59462198429d2bac013028b72393a233a126 (patch)
tree0ddff82e03acbc030e3b211061a9251ca7fb9032
parent47b5467dc4f39954154a522d7f1b3ed2c2507f02 (diff)
Fix bug 1040 - "pyside-uic overwriting attributes before they are being used"
Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org> Reviewed-by: Paulo Alcantara <pcacjr@gmail.com>
-rw-r--r--pysideuic/uiparser.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pysideuic/uiparser.py b/pysideuic/uiparser.py
index c49bfe1..82258d1 100644
--- a/pysideuic/uiparser.py
+++ b/pysideuic/uiparser.py
@@ -559,11 +559,6 @@ class UIParser(object):
elif isinstance(w, QtGui.QTableWidget):
text = self.wprops.getProperty(elem, "text")
- icon = self.wprops.getProperty(elem, "icon")
- flags = self.wprops.getProperty(elem, "flags")
- check_state = self.wprops.getProperty(elem, "checkState")
- background = self.wprops.getProperty(elem, "background")
- foreground = self.wprops.getProperty(elem, "foreground")
item = self.factory.createQObject("QTableWidgetItem", "item",
(), False)
@@ -575,18 +570,23 @@ class UIParser(object):
row = int(elem.attrib["row"])
col = int(elem.attrib["column"])
+ icon = self.wprops.getProperty(elem, "icon")
if icon:
item.setIcon(icon)
+ flags = self.wprops.getProperty(elem, "flags")
if flags:
item.setFlags(flags)
+ check_state = self.wprops.getProperty(elem, "checkState")
if check_state:
item.setCheckState(check_state)
+ background = self.wprops.getProperty(elem, "background")
if background:
item.setBackground(background)
+ foreground = self.wprops.getProperty(elem, "foreground")
if foreground:
item.setForeground(foreground)