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->statusLabel->setHidden(true);
this->setFixedSize(400, 130);
updateChannel = channel;
currentVersion = UpdateCheck::getCurrentVersion(updateChannel);
connect(updateCheck, &UpdateCheck::updateCheckError, [=](const QString &errorMsg) {

View File

@@ -10,6 +10,18 @@
<height>130</height>
</rect>
</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">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>

View File

@@ -58,7 +58,9 @@ VMManagerAddMachine(QWidget *parent) : QWizard(parent)
#endif
// 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);
// setPixmap(LogoPixmap, QPixmap(":/settings/qt/icons/86Box-gray.ico"));
@@ -398,9 +400,11 @@ ConclusionPage::initializePage()
#ifdef CUSTOM_SYSTEM_LOCATION
systemLocation->setText(nativePath);
#endif
if (!displayNameDisplay.isEmpty())
if (!displayNameDisplay.isEmpty()) {
displayNameLabel->setVisible(true);
displayName->setVisible(true);
displayName->setText(displayNameDisplay);
else {
} else {
displayNameLabel->setVisible(false);
displayName->setVisible(false);
}

View File

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

View File

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