Commit 02068b8e authored by Tobias Hunger's avatar Tobias Hunger

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: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent bffca9b1
......@@ -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()));
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment