about dialog: Allow rich text with links as creator
This commit is contained in:
parent
71cca64360
commit
da00c5ada7
|
@ -9,8 +9,8 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
|||
set(META_APP_DESCRIPTION
|
||||
"Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
|
||||
set(META_VERSION_MAJOR 5)
|
||||
set(META_VERSION_MINOR 12)
|
||||
set(META_VERSION_PATCH 2)
|
||||
set(META_VERSION_MINOR 13)
|
||||
set(META_VERSION_PATCH 0)
|
||||
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
||||
|
||||
# add project files
|
||||
|
|
|
@ -57,7 +57,13 @@ AboutDialog::AboutDialog(QWidget *parent, const QString &applicationName, const
|
|||
} else {
|
||||
m_ui->productNameLabel->setText(QApplication::applicationName());
|
||||
}
|
||||
m_ui->creatorLabel->setText(tr("developed by %1").arg(creator.isEmpty() ? QApplication::organizationName() : creator));
|
||||
if (creator.startsWith(QLatin1Char('<'))) {
|
||||
// assing rich text as-is
|
||||
m_ui->creatorLabel->setText(creator);
|
||||
} else {
|
||||
// add "developed by " before creator name
|
||||
m_ui->creatorLabel->setText(tr("developed by %1").arg(creator.isEmpty() ? QApplication::organizationName() : creator));
|
||||
}
|
||||
m_ui->versionLabel->setText(version.isEmpty() ? QApplication::applicationVersion() : version);
|
||||
const auto &deps(dependencyVersions.size() ? dependencyVersions : ApplicationUtilities::dependencyVersions2);
|
||||
if (deps.size()) {
|
||||
|
|
|
@ -233,6 +233,12 @@
|
|||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in New Issue