ui: Fixed layout of QtPathListDialog

This commit is contained in:
Eberhard Graether
2018-01-09 17:27:33 +01:00
parent c479493e02
commit e228f3477a
4 changed files with 14 additions and 8 deletions
@@ -203,12 +203,13 @@ QtDirectoryListBox::QtDirectoryListBox(QWidget *parent, const QString& listName,
setAcceptDrops(true);
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Minimum);
setMaximumHeight(200);
setMinimumHeight(100);
resize();
}
QSize QtDirectoryListBox::sizeHint() const
{
return QSize(QFrame::sizeHint().width(), 100);
return QSize(QFrame::sizeHint().width(), minimumHeight());
}
void QtDirectoryListBox::clear()
+7 -3
View File
@@ -4,7 +4,7 @@
#include "qt/element/QtDirectoryListBox.h"
QtPathListDialog::QtPathListDialog(const QString& title, const QString& description, QWidget* parent)
: QtWindow(parent)
: QtWindow(false, parent)
, m_title(title)
, m_description(description)
{
@@ -12,7 +12,7 @@ QtPathListDialog::QtPathListDialog(const QString& title, const QString& descript
QSize QtPathListDialog::sizeHint() const
{
return QSize(550, 550);
return QSize(550, 350);
}
void QtPathListDialog::setRelativeRootDirectory(const FilePath& dir)
@@ -40,7 +40,11 @@ void QtPathListDialog::populateWindow(QWidget* widget)
description->setWordWrap(true);
layout->addWidget(description);
m_pathList = new QtDirectoryListBox(this, m_title);
layout->addSpacing(10);
m_pathList = new QtDirectoryListBox(nullptr, m_title);
m_pathList->setMinimumHeight(150);
m_pathList->setMaximumHeight(1000);
layout->addWidget(m_pathList);
widget->setLayout(layout);
+1 -1
View File
@@ -4,7 +4,7 @@
#include <QPlainTextEdit>
QtTextEditDialog::QtTextEditDialog(const QString& title, const QString& description, QWidget* parent)
: QtWindow(parent)
: QtWindow(false, parent)
, m_title(title)
, m_description(description)
{
@@ -503,9 +503,10 @@ void QtProjectWizzardContentPathsHeaderSearch::detectIncludesButtonClicked()
m_pathsDialog = std::make_shared<QtPathListDialog>(
"Detect Include Paths",
"<p>Automatically search the paths provided below for additional include paths that "
"can be used to resolve include directives within your source code.</p>"
"<p>The indexed paths will be searched by default but you can add further paths if required.</p>"
"<p>Automatically search for header files in the paths provided below to find missing include paths for "
"unresolved include directives in your source code.</p>"
"<p>The \"Files & Directories to Index\" will be searched by default, but you can add further paths, such "
"as directories of third-party libraries, if required.</p>"
);
m_pathsDialog->setup();