def __init__(self):
BWizardPage.__init__(self, UI_LOCATION + "/intro_page.ui")
self.setTitle(self.tr("Welcome in BeRTOS Wizard!"))
- self.image = QPixmap(":/images/logo.png")
-
- ## Overloaded QWidget methods ##
-
- def resizeEvent(self, event):
- self._scalePicture()
- BWizardPage.resizeEvent(self, event)
-
- def showEvent(self, event):
- self._scalePicture()
- BWizardPage.showEvent(self, event)
-
- ##
+ pixmap = self.pageContent.imageLabel.pixmap()
+ self.pageContent.imageLabel.setPixmap(pixmap.scaled(300, 400, Qt.KeepAspectRatio))
## Overloaded QWizardPage methods ##
"""
return True
- ####
-
- def _scalePicture(self):
- """
- I need this method because the scaledContent property of the QLabel
- doesn't care the aspect ratio.
- """
- label_size = self.pageContent.imageLabel.size()
- scaled_image = self.image.scaled(label_size, Qt.KeepAspectRatio)
- self.pageContent.imageLabel.setPixmap(scaled_image)
+ ####
\ No newline at end of file
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
-<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Project created successfully!</span></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p>
-<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can now start developing your application.</p></body></html></string>
+</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
+<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Project created successfully!</span></p>
+<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can now start developing your application.</p></body></html></string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
<rect>
<x>0</x>
<y>0</y>
- <width>564</width>
- <height>82</height>
+ <width>556</width>
+ <height>76</height>
</rect>
</property>
</widget>