#include "widget.h" #include "./ui_widget.h" #include #include #include "spdlog/spdlog.h" // #include "fmtlog.h" // #include "VideoPlayer1.h" Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widget) { ui->setupUi(this); m_videoPlayer = std::make_shared(ui->widget_display); m_videoPlayer->resize(1280, 720); // m_videoPlayer1 = std::make_shared(); // m_videoPlayer1->setParent(ui->widget_display); SPDLOG_INFO("***** Qt Library *****"); /* 显示预览图片 */ QString imagePath = QApplication::applicationDirPath() + "/0.jpg"; QImage image(imagePath); image = image.scaled(1280, 720); ui->label->setPixmap(QPixmap::fromImage(image)); } Widget::~Widget() { delete ui; }