下一步完善旋转等画面功能
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "ui_displaywind.h"
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <globalhelper.h>
|
||||
DisplayWind::DisplayWind(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::DisplayWind),
|
||||
@@ -9,6 +10,7 @@ DisplayWind::DisplayWind(QWidget *parent) :
|
||||
// stParentWidget_(parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// this->setStyleSheet(GlobalHelper::GetQssStr(":/res/qss/show.css"));
|
||||
win_width_ = width();
|
||||
win_height_ = height();
|
||||
memset(&dst_video_frame_, sizeof(VideoFrame), 0);
|
||||
@@ -128,8 +130,19 @@ void DisplayWind::enterFullScreen()
|
||||
}
|
||||
setParent(nullptr);
|
||||
}
|
||||
setWindowFlags(Qt::Window);
|
||||
showFullScreen();
|
||||
setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
|
||||
|
||||
QScreen *currentScreen = screen() ? screen() : QGuiApplication::primaryScreen();
|
||||
if (currentScreen) {
|
||||
QRect availableGeometry = currentScreen->availableGeometry();
|
||||
this->setGeometry(availableGeometry);
|
||||
this->setStyleSheet("background-color: black;");
|
||||
show();
|
||||
}
|
||||
else {
|
||||
show();
|
||||
}
|
||||
// showFullScreen();
|
||||
|
||||
setFocus();
|
||||
|
||||
@@ -144,7 +157,7 @@ void DisplayWind::exitFullScreen()
|
||||
|
||||
bIsFull_ = false;
|
||||
setWindowFlags(Qt::Widget);
|
||||
hide();
|
||||
// hide();
|
||||
|
||||
if (stParentWidget_) {
|
||||
setParent(stParentWidget_);
|
||||
@@ -158,12 +171,13 @@ void DisplayWind::exitFullScreen()
|
||||
setGeometry(stOriginalGeometry_);
|
||||
}
|
||||
}
|
||||
resize(nWinWidthBack_, nWinHeightBack_);
|
||||
show();
|
||||
|
||||
// show();
|
||||
// resize(nWinWidthBack_, nWinHeightBack_);
|
||||
setFocus();
|
||||
stParentLayout_ = nullptr;
|
||||
nParentLayoutIndex_ = 0;
|
||||
stOriginalGeometry_ = QRect();
|
||||
// stParentLayout_ = nullptr;
|
||||
// nParentLayoutIndex_ = 0;
|
||||
// stOriginalGeometry_ = QRect();
|
||||
|
||||
emit signalFullScreenChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user