Skip to content

Commit 5f23820

Browse files
committed
App: fix CFrmMediaDevices twinkle
Because of the QScrollArea don't adjust QVideoWidget size
1 parent 2f182b5 commit 5f23820

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

‎App/Client/ParameterDlgSettings.cpp‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,14 @@ CParameterDlgSettings::~CParameterDlgSettings()
9797

9898
void CParameterDlgSettings::AddViewers(const QList<QWidget *> &wViewer)
9999
{
100-
int nWidth = 0;
101-
int nHeigth = 0;
102-
foreach(auto p, wViewer) {
103-
if(!p) continue;
104-
nWidth = qMax(nWidth, p->frameSize().width());
105-
nHeigth = qMax(nHeigth, p->frameSize().height());
106-
}
107-
bool bScroll = false;
108-
QScreen* pScreen = QApplication::primaryScreen();
109-
QSize size = this->size();
110-
if(nWidth > size.width() || nHeigth > size.height())
111-
bScroll = true;
112100
// [connect accepted to slotAccept of widget]
113101
foreach(auto p, wViewer)
114102
{
115103
QString szMsg;
116104
QWidget* pView = p;
117-
if(bScroll)
105+
QSize size = this->size();
106+
if(p->frameSize().width() > size.width()
107+
|| p->frameSize().height() > size.height())
118108
{
119109
QScrollArea* pScroll = new QScrollArea(ui->tabWidget);
120110
if(!pScroll) continue;

‎App/Client/main.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
9797

9898
//qputenv("QT_MEDIA_BACKEND", "ffmpeg");
9999

100-
//* // TODO: Wayland下设置中的音频设置窗口有问题
100+
//* // TODO: Wayland下视频(QVideoWidget*)覆盖全屏工具条
101101
#if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) \
102102
&& (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)))
103103
// https://doc.qt.io/qt-6/zh/wayland-and-qt.html

0 commit comments

Comments
 (0)