165 if self.attrs: |
165 if self.attrs: |
166 width = max(width, self.attrs.boundingRect().width()) |
166 width = max(width, self.attrs.boundingRect().width()) |
167 height = height + self.attrs.boundingRect().height() + self.margin |
167 height = height + self.attrs.boundingRect().height() + self.margin |
168 if self.meths: |
168 if self.meths: |
169 width = max(width, self.meths.boundingRect().width()) |
169 width = max(width, self.meths.boundingRect().width()) |
170 height = height + self.meths.boundingRect().height() |
170 height += self.meths.boundingRect().height() |
171 self.setSize(width + 2 * self.margin, height + 2 * self.margin) |
171 self.setSize(width + 2 * self.margin, height + 2 * self.margin) |
172 |
172 |
173 def setModel(self, model): |
173 def setModel(self, model): |
174 """ |
174 """ |
175 Public method to set the class model. |
175 Public method to set the class model. |