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:
parent
12d5dcc78c
commit
cb52ad8bc5
@ -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();
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user