Wizards: add option to show an image for description

IWizard::descriptionImage() can return the path to an image.
An empty string is interpreted as no image available.

Change-Id: Ia2012eecbfdeb9bec123ed666fff2d73d79e05ce
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
Thomas Hartmann
2012-02-10 15:40:53 +01:00
parent 5d28d58c57
commit 3aa2b0876c
7 changed files with 99 additions and 38 deletions

View File

@@ -436,6 +436,13 @@ void NewDialog::currentItemChanged(const QModelIndex &index)
m_ui->templateDescription->setHtml(desciption);
if (!wizard->descriptionImage().isEmpty()) {
m_ui->imageLabel->setVisible(true);
m_ui->imageLabel->setPixmap(wizard->descriptionImage());
} else {
m_ui->imageLabel->setVisible(false);
}
} else {
m_ui->templateDescription->setText(QString());
}