12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include "widget.h"
- #include "./ui_widget.h"
- #include <QTimer>
- #include <QFileDialog>
- #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<PlayerGLWidget>(ui->widget_display);
- m_videoPlayer->resize(1280, 720);
- // m_videoPlayer1 = std::make_shared<VideoPlayer1>();
- // 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;
- }
|