C++98 compatibility.

This commit is contained in:
mfreiholz
2016-02-12 07:15:10 +01:00
parent c74204d5b7
commit 08f1968b31
17 changed files with 77 additions and 67 deletions

View File

@@ -9,27 +9,27 @@
IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidget *parent) :
QFrame(parent)
{
auto l = new QBoxLayout(QBoxLayout::LeftToRight);
QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight);
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
// Icon label
if (icon.isNull())
{
// auto titleIcon = new QLabel();
// QLabel* titleIcon = new QLabel();
// titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
// l->addWidget(titleIcon);
}
else
{
auto titleIcon = new QLabel();
QLabel* titleIcon = new QLabel();
titleIcon->setPixmap(icon.pixmap(16, 16));
l->addWidget(titleIcon);
}
// Title label
auto titleText = new QLabel(title);
auto titleFont = titleText->font();
QLabel* titleText = new QLabel(title);
QFont titleFont = titleText->font();
titleFont.setBold(true);
titleText->setFont(titleFont);
l->addWidget(titleText, 1);