Skip to content

Commit

Permalink
fixed faulty code
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats committed Aug 12, 2024
1 parent ab83ce6 commit 8984847
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/gui/nmcgui/nmcadvertwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "QtWidgets/qapplication.h"
#include "QtWidgets/qboxlayout.h"
#include "QGraphicsPixmapItem"
#include "nmcadvertwidget.h"
#include "QtWidgets/qboxlayout.h"

NMCAdvertWidget::NMCAdvertWidget(QWidget *parent) : QWidget(parent)
,m_graphicsView(new NMCCustomGraphicsView(this))
Expand Down Expand Up @@ -237,19 +235,4 @@ void NMCAdvertWidget::selectTextByID()
{
m_currentImageId != 0 ? m_header->setVisible(false) : m_header->setVisible(true);
}
{
setFixedSize(700,502);
QHBoxLayout *layout = new QHBoxLayout(this);
setLayout(layout);
layout->addWidget(&m_imageLabel);
layout->setMargin(0);
//Set initial image
loadPNG(QString(":/client/theme/NMCIcons/configuration1.png"));
}

void NMCAdvertWidget::loadPNG(const QString &name)
{
QPixmap pixmap(name);
pixmap = pixmap.scaled(window()->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
m_imageLabel.setPixmap(pixmap);
}
}

0 comments on commit 8984847

Please sign in to comment.