summaryrefslogtreecommitdiff
path: root/src/tools/qtcreatorwidgets/customwidgets.cpp
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-07-01 09:32:47 +0200
committercon <qtc-committer@nokia.com>2010-07-01 10:56:00 +0200
commit6dc4a039f2cb50a02a0e15265548547b94a6dc9d (patch)
tree62ef43efd85b70aa394cf3fc72dd1edcec2ff71c /src/tools/qtcreatorwidgets/customwidgets.cpp
parent1d88741086b7d6365a1244d59f77f95e353cce71 (diff)
downloadqt-creator-6dc4a039f2cb50a02a0e15265548547b94a6dc9d.tar.gz
Refactor fancy line edit to optionally have two buttons.
Also unify some method naming. Use the new feature to add clear buttons to the Locator, and the find tool bar. Task-number: QTCREATORBUG-705
Diffstat (limited to 'src/tools/qtcreatorwidgets/customwidgets.cpp')
-rw-r--r--src/tools/qtcreatorwidgets/customwidgets.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/qtcreatorwidgets/customwidgets.cpp b/src/tools/qtcreatorwidgets/customwidgets.cpp
index cc0a98e76f..42aea5e545 100644
--- a/src/tools/qtcreatorwidgets/customwidgets.cpp
+++ b/src/tools/qtcreatorwidgets/customwidgets.cpp
@@ -140,9 +140,12 @@ QtColorButton_CW::QtColorButton_CW(QObject *parent) :
QWidget *FancyLineEdit_CW::createWidget(QWidget *parent)
{
Utils::FancyLineEdit *fle = new Utils::FancyLineEdit(parent);
+ fle->setButtonVisible(Utils::FancyLineEdit::Left, true);
+ fle->setButtonPixmap(Utils::FancyLineEdit::Left,
+ fle->style()->standardIcon(QStyle::SP_ArrowRight).pixmap(16));
QMenu *menu = new QMenu(fle);
- menu->addAction("Test");
- fle->setMenu(menu);
+ menu->addAction(QLatin1String("Example"));
+ fle->setButtonMenu(Utils::FancyLineEdit::Left, menu);
return fle;
}