text: #include "mainwnd.h"
  #include "ui_mainwnd.h"
  #include <QLabel>
  #include <QHBoxLayout>
  #include <QVBoxLayout>
  #include <QPixmap>
  #include <QImage>
  #include <QDebug>
  #include <QMessageBox>
  #include <QScreen>
  #include "QScreenCutThread.h"
  
  MainWnd::MainWnd(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWnd)
  {
      ui->setupUi(this);
  
      m_screen = QGuiApplication::primaryScreen();
      m_qsct = new QScreenCutThread(m_screen);
      QObject::connect(m_qsct, SIGNAL(sendstu(QPixmap)), this, SLOT(on_solts_drawdesk(QPixmap)));
      m_qsct->start();
      m_label = new QLabel;
  }
  
  
  
  MainWnd::~MainWnd()
  {
      delete ui;
  }
  
  void MainWnd::on_solts_drawdesk(QPixmap pix)
  {
      //m_label->setScaledContents(true);
      //m_label->contentsRect();
      //qDebug() << "width:" << ui->verticalLayout->geometry().width() << " height:" << ui->verticalLayout->geometry().height();
      //qDebug() << "scrollAreaWidgetContents width:" << ui->scrollAreaWidgetContents->width() << " scrollAreaWidgetContents height:" << ui->scrollAreaWidgetContents->height();
      int width = ui->label->width();
      int height = ui->label->height();
      QSize qs(width, height);
      QPixmap realPix = pix.scaled(qs);
      ui->label->setPixmap(realPix);
  
      //image encode libbvpx
      //send stream
  
      //m_label->setScaledContents(true);
      //m_label->setPixmap(realPix);
      //ui->horizontalLayout->addWidget(m_label);
  }
  