1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

Better file select button

This commit is contained in:
Martin Tůma 2016-10-11 03:17:30 +02:00
parent 12d5dcc78c
commit cb52ad8bc5
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#include <QPushButton>
#include <QToolButton>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QFileInfo>
@ -12,7 +12,8 @@ FileSelectWidget::FileSelectWidget(QWidget *parent) : QWidget(parent)
QFontMetrics fm(QApplication::font());
_edit = new QLineEdit();
_edit->setMinimumWidth(fm.boundingRect(QDir::homePath()).width());
_button = new QPushButton(tr("Browse..."));
_button = new QToolButton();
_button->setText("...");
connect(_button, SIGNAL(clicked()), this, SLOT(browse()));
QHBoxLayout *layout = new QHBoxLayout();

View File

@ -4,7 +4,7 @@
#include <QWidget>
#include <QLineEdit>
class QPushButton;
class QToolButton;
class FileSelectWidget : public QWidget
{
@ -22,7 +22,7 @@ private slots:
private:
QLineEdit *_edit;
QPushButton *_button;
QToolButton *_button;
QString _filter;
};