summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-21 13:17:27 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-21 13:37:14 +0000
commit02068b8ef1d5dd615eb53478d01ff881cda73b74 (patch)
tree261dab227d7def0870d51158bd3414505a3727fa /src
parentbffca9b1dbcc3b8924e888587bb159cb31961905 (diff)
downloadqt-creator-02068b8ef1d5dd615eb53478d01ff881cda73b74.tar.gz
ToolChain: Add scrollbar to config widget
This is necessary for the custom tool chain that has its widgets squashed together. Task-number: QTCREATORBUG-10329 Change-Id: I53f125721c1e018bca07503049f412fec3725c22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.cpp25
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.h4
2 files changed, 24 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.cpp b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
index 65e1e13d09..362e463b5c 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.cpp
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
@@ -31,6 +31,7 @@
#include "toolchainconfigwidget.h"
#include "toolchain.h"
+#include <utils/detailswidget.h>
#include <utils/qtcassert.h>
#include <QString>
@@ -38,6 +39,8 @@
#include <QFormLayout>
#include <QLineEdit>
#include <QLabel>
+#include <QScrollArea>
+#include <QPainter>
namespace ProjectExplorer {
@@ -46,10 +49,26 @@ ToolChainConfigWidget::ToolChainConfigWidget(ToolChain *tc) :
{
Q_ASSERT(tc);
- m_nameLineEdit = new QLineEdit(this);
- m_mainLayout = new QFormLayout(this);
- m_nameLineEdit->setText(tc->displayName());
+ Utils::DetailsWidget *centralWidget = new Utils::DetailsWidget;
+ centralWidget->setState(Utils::DetailsWidget::NoSummary);
+
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setFrameShape(QFrame::NoFrame);
+ setWidgetResizable(true);
+ setFocusPolicy(Qt::NoFocus);
+
+ setWidget(centralWidget);
+
+ QWidget *detailsBox = new QWidget();
+
+ m_mainLayout = new QFormLayout(detailsBox);
+ m_mainLayout->setContentsMargins(0, 0, 0, 0);
+ centralWidget->setWidget(detailsBox);
m_mainLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); // for the Macs...
+
+ m_nameLineEdit = new QLineEdit;
+ m_nameLineEdit->setText(tc->displayName());
+
m_mainLayout->addRow(tr("Name:"), m_nameLineEdit);
connect(m_nameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(dirty()));
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.h b/src/plugins/projectexplorer/toolchainconfigwidget.h
index 13df6d3ae7..a1e5ba5b94 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.h
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.h
@@ -33,7 +33,7 @@
#include "projectexplorer_export.h"
-#include <QWidget>
+#include <QScrollArea>
QT_BEGIN_NAMESPACE
class QFormLayout;
@@ -50,7 +50,7 @@ class ToolChain;
// ToolChainConfigWidget
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT ToolChainConfigWidget : public QWidget
+class PROJECTEXPLORER_EXPORT ToolChainConfigWidget : public QScrollArea
{
Q_OBJECT