ObjectInspector QPushButton -> QToolButton

This commit is contained in:
Arin Alexander 2019-02-18 13:55:53 +03:00
parent 2bbd963c18
commit 4e91701387

View File

@ -33,7 +33,7 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QToolButton>
#include "lrglobal.h" #include "lrglobal.h"
#include "lrobjectinspectorwidget.h" #include "lrobjectinspectorwidget.h"
@ -177,8 +177,9 @@ ObjectInspectorWidget::ObjectInspectorWidget(QWidget *parent)
m_objectInspectorView->setModel(m_filterModel); m_objectInspectorView->setModel(m_filterModel);
QVBoxLayout* l = new QVBoxLayout(); QVBoxLayout* l = new QVBoxLayout();
QLineEdit* le = new QLineEdit(this); QLineEdit* le = new QLineEdit(this);
QPushButton * pbClear = new QPushButton(QIcon(":/items/clear.png"),"",this); QToolButton * pbClear = new QToolButton(this);
pbClear->setToolTip(tr("Clear")); pbClear->setToolTip(tr("Clear"));
pbClear->setIcon(QIcon(":/items/clear.png"));
connect(pbClear, SIGNAL(clicked()), le, SLOT(clear())); connect(pbClear, SIGNAL(clicked()), le, SLOT(clear()));
le->setPlaceholderText(tr("Filter")); le->setPlaceholderText(tr("Filter"));
connect(le, SIGNAL(textChanged(const QString&)), this, SLOT(slotFilterTextChanged(const QString&))); connect(le, SIGNAL(textChanged(const QString&)), this, SLOT(slotFilterTextChanged(const QString&)));
@ -189,6 +190,7 @@ ObjectInspectorWidget::ObjectInspectorWidget(QWidget *parent)
l->addLayout(h); l->addLayout(h);
l->addWidget(m_objectInspectorView); l->addWidget(m_objectInspectorView);
l->setContentsMargins(2,2,2,2); l->setContentsMargins(2,2,2,2);
l->setSpacing(2);
this->setLayout(l); this->setLayout(l);
} }