Make PathChooser always use QPushButtons

It might look a little bigger, but since we are using
QPushButtons by default in the options pages it's more
uniform considering the buttons around.

If we "conclude" it looks weird or unpleasant in other
places (like in the wizards, for example) we can consider
an alternative approach.

Reviewed-by: con
This commit is contained in:
Leandro Melo
2011-02-28 15:53:37 +01:00
parent b3791e52d7
commit e6d10c86ec

View File

@@ -50,7 +50,6 @@
#include <QtGui/QFileDialog> #include <QtGui/QFileDialog>
#include <QtGui/QHBoxLayout> #include <QtGui/QHBoxLayout>
#include <QtGui/QLineEdit> #include <QtGui/QLineEdit>
#include <QtGui/QToolButton>
#include <QtGui/QPushButton> #include <QtGui/QPushButton>
/*static*/ const char * const Utils::PathChooser::browseButtonLabel = /*static*/ const char * const Utils::PathChooser::browseButtonLabel =
@@ -262,11 +261,7 @@ PathChooser::~PathChooser()
void PathChooser::addButton(const QString &text, QObject *receiver, const char *slotFunc) void PathChooser::addButton(const QString &text, QObject *receiver, const char *slotFunc)
{ {
#ifdef Q_WS_MAC
QPushButton *button = new QPushButton; QPushButton *button = new QPushButton;
#else
QToolButton *button = new QToolButton;
#endif
button->setText(text); button->setText(text);
connect(button, SIGNAL(clicked()), receiver, slotFunc); connect(button, SIGNAL(clicked()), receiver, slotFunc);
m_d->m_hLayout->addWidget(button); m_d->m_hLayout->addWidget(button);