1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

27 lines
609 B
C++
Raw Normal View History

2018-05-28 00:21:30 +08:00
#include "mainwindow.h"
#include "ui_mainwindow.h"
2018-05-28 14:21:19 +08:00
#include <opencv.hpp>
2018-05-28 20:34:01 +08:00
#include <highgui.hpp>
2018-06-06 20:29:54 +08:00
#include <qqtgiflabel.h>
2018-05-28 00:21:30 +08:00
2018-05-28 14:21:19 +08:00
MainWindow::MainWindow ( QWidget* parent ) :
QMainWindow ( parent ),
ui ( new Ui::MainWindow )
2018-05-28 00:21:30 +08:00
{
2018-05-28 14:21:19 +08:00
ui->setupUi ( this );
2018-05-28 20:34:01 +08:00
// read an image
cv::Mat image = cv::imread ( "./tt.png", 1 );
// create image window named "My Image"
cv::namedWindow ( "OpenCV Image" );
2018-05-28 20:34:01 +08:00
// show the image on window
cv::imshow ( "OpenCV Image", image );
2018-06-06 20:29:54 +08:00
QQtGifLabel* label = new QQtGifLabel ( this );
2018-05-28 00:21:30 +08:00
}
MainWindow::~MainWindow()
{
delete ui;
}