def createContent(self): # Create the items. self.heading = HeadingItem(self.name, self.scene(), self) para1 = self.loadDescription(0, 1) if not para1: para1 = Colors.contentColor + "Could not load description. Ensure that the documentation for Qt is built." bgcolor = Colors.sceneBg1.darker(200) bgcolor.setAlpha(100) self.description1 = DemoTextItem(para1, Colors.contentFont(), Colors.heading, 500, self.scene(), self, DemoTextItem.STATIC_TEXT) self.description2 = DemoTextItem(self.loadDescription(1, 2), Colors.contentFont(), Colors.heading, 250, self.scene(), self, DemoTextItem.STATIC_TEXT) # Place the items on screen. self.heading.setPos(0, 3) self.description1.setPos( 0, self.heading.pos().y() + self.heading.boundingRect().height() + 10) self.description2.setPos( 0, self.description1.pos().y() + self.description1.boundingRect().height() + 15)
def createContent(self): # Create the items. self.heading = HeadingItem(self.name, self) para1 = self.loadDescription(0, 1) if not para1: para1 = Colors.contentColor + "Could not load description. Ensure that the documentation for Qt is built." bgcolor = Colors.sceneBg1.darker(200) bgcolor.setAlpha(100) self.description1 = DemoTextItem(para1, Colors.contentFont(), Colors.heading, 500, self, DemoTextItem.STATIC_TEXT) self.description2 = DemoTextItem(self.loadDescription(1, 2), Colors.contentFont(), Colors.heading, 250, self, DemoTextItem.STATIC_TEXT) # Place the items on screen. self.heading.setPos(0, 3) self.description1.setPos(0, self.heading.pos().y() + self.heading.boundingRect().height() + 10) self.description2.setPos(0, self.description1.pos().y() + self.description1.boundingRect().height() + 15)
def createContent(self): # Create the items. self.heading = HeadingItem(self.name, self) self.description = DemoTextItem(self.loadDescription(), Colors.contentFont(), Colors.heading, 500, self) imgHeight = 340 - int(self.description.boundingRect().height()) + 50 self.screenshot = ImageItem(QImage.fromData(self._menu_manager.getImage(self.name)), 550, imgHeight, self) # Place the items on screen. self.heading.setPos(0, 3) self.description.setPos(0, self.heading.pos().y() + self.heading.boundingRect().height() + 10) self.screenshot.setPos(0, self.description.pos().y() + self.description.boundingRect().height() + 10)
def createContent(self): # Create the items. self.heading = HeadingItem(self.name, self.scene(), self) self.description = DemoTextItem(self.loadDescription(), Colors.contentFont(), Colors.heading, 500, self.scene(), self) imgHeight = 340 - int(self.description.boundingRect().height()) + 50 self.screenshot = ImageItem(QtGui.QImage.fromData(self._menu_manager.getImage(self.name)), 550, imgHeight, self.scene(), self) # Place the items on screen. self.heading.setPos(0, 3) self.description.setPos(0, self.heading.pos().y() + self.heading.boundingRect().height() + 10) self.screenshot.setPos(0, self.description.pos().y() + self.description.boundingRect().height() + 10)