Files
picpanel/core_form/frmalbum/frmalbum.cpp

47 lines
1.2 KiB
C++

#include "frmalbum.h"
#include "ui_frmalbum.h"
#include <QUrl>
FrmAlbum::FrmAlbum(QWidget *parent) : QWidget(parent)
{
initForm();
}
FrmAlbum::~FrmAlbum()
{
delete ui;
}
void FrmAlbum::initForm()
{
layout = new QHBoxLayout(this);
panelWidget = new PanelWidget(this);
layout->addWidget(panelWidget);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
this->setLayout(layout);
panelWidget->setObjectName("widget");
panelWidget->setStyleSheet("background-color: rgb(63, 60, 55)");
panelWidget->setAutoHeight(false);
panelWidget->setAutoWidth(false);
panelWidget->setAutoHeight(false);
panelWidget->setAutoWidth(false);
// qDebug() << ui->widget;
QList<QUrl> urls = {
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250320201317.png"),
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/EDH386.jpeg"),
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250321103557.png"),
};
foreach (const QUrl& u, urls) {
FrmImgShow* widget = new FrmImgShow(this);
widget->loadImage(u);
picWidgetList.push_front(widget);
}
panelWidget->setWidget(picWidgetList, 3);
}