Merge pull request #5977 from lemondrops/manager-2

Qt: Avoid setting fixed window size
This commit is contained in:
Miran Grča
2025-08-17 14:22:01 +02:00
committed by GitHub
5 changed files with 23 additions and 6 deletions

View File

@@ -31,7 +31,6 @@ UpdateCheckDialog(const UpdateCheck::UpdateChannel channel, QWidget *parent) : Q
{ {
ui->setupUi(this); ui->setupUi(this);
ui->statusLabel->setHidden(true); ui->statusLabel->setHidden(true);
this->setFixedSize(400, 130);
updateChannel = channel; updateChannel = channel;
currentVersion = UpdateCheck::getCurrentVersion(updateChannel); currentVersion = UpdateCheck::getCurrentVersion(updateChannel);
connect(updateCheck, &UpdateCheck::updateCheckError, [=](const QString &errorMsg) { connect(updateCheck, &UpdateCheck::updateCheckError, [=](const QString &errorMsg) {

View File

@@ -10,6 +10,18 @@
<height>130</height> <height>130</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>400</width>
<height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>130</height>
</size>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>

View File

@@ -58,7 +58,9 @@ VMManagerAddMachine(QWidget *parent) : QWizard(parent)
#endif #endif
// Wizard wants to resize based on image. This keeps the size // Wizard wants to resize based on image. This keeps the size
setFixedSize(QSize(550, size().height())); setMinimumSize(QSize(550, size().height()));
setMaximumSize(QSize(550, size().height()));
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, true);
setOption(HaveHelpButton, false); setOption(HaveHelpButton, false);
// setPixmap(LogoPixmap, QPixmap(":/settings/qt/icons/86Box-gray.ico")); // setPixmap(LogoPixmap, QPixmap(":/settings/qt/icons/86Box-gray.ico"));
@@ -398,9 +400,11 @@ ConclusionPage::initializePage()
#ifdef CUSTOM_SYSTEM_LOCATION #ifdef CUSTOM_SYSTEM_LOCATION
systemLocation->setText(nativePath); systemLocation->setText(nativePath);
#endif #endif
if (!displayNameDisplay.isEmpty()) if (!displayNameDisplay.isEmpty()) {
displayNameLabel->setVisible(true);
displayName->setVisible(true);
displayName->setText(displayNameDisplay); displayName->setText(displayNameDisplay);
else { } else {
displayNameLabel->setVisible(false); displayNameLabel->setVisible(false);
displayName->setVisible(false); displayName->setVisible(false);
} }

View File

@@ -238,7 +238,8 @@ illegal_chars:
progDialog->setMaximum(0); progDialog->setMaximum(0);
progDialog->setMinimum(0); progDialog->setMinimum(0);
progDialog->setWindowFlags(progDialog->windowFlags() & ~Qt::WindowCloseButtonHint); progDialog->setWindowFlags(progDialog->windowFlags() & ~Qt::WindowCloseButtonHint);
progDialog->setFixedSize(progDialog->sizeHint()); progDialog->setMinimumSize(progDialog->sizeHint());
progDialog->setMaximumSize(progDialog->sizeHint());
progDialog->setMinimumDuration(0); progDialog->setMinimumDuration(0);
progDialog->setCancelButton(nullptr); progDialog->setCancelButton(nullptr);
progDialog->setAutoClose(false); progDialog->setAutoClose(false);

View File

@@ -133,7 +133,8 @@ VMManagerSystem::scanForConfigs(QWidget* parent, const QString &searchPath)
progDialog.setMinimum(0); progDialog.setMinimum(0);
progDialog.setMaximum(0); progDialog.setMaximum(0);
progDialog.setWindowFlags(progDialog.windowFlags() & ~Qt::WindowCloseButtonHint); progDialog.setWindowFlags(progDialog.windowFlags() & ~Qt::WindowCloseButtonHint);
progDialog.setFixedSize(progDialog.sizeHint()); progDialog.setMinimumSize(progDialog.sizeHint());
progDialog.setMaximumSize(progDialog.sizeHint());
QElapsedTimer scanTimer; QElapsedTimer scanTimer;
scanTimer.start(); scanTimer.start();
QVector<VMManagerSystem *> system_configs; QVector<VMManagerSystem *> system_configs;