19 #include "browse_lineedit.h" 24 namespace ParameterGui
36 setFocusPolicy (Qt::StrongFocus);
38 QHBoxLayout *layout =
new QHBoxLayout;
44 setAutoFillBackground(
true);
45 setBackgroundRole(QPalette::Highlight);
56 int w = size_line_editor.rwidth() + size_browse_button.rwidth(),
57 h = qMax(size_line_editor.rheight(), size_browse_button.rheight());
66 QSize size_line_editor =
line_editor->minimumSizeHint(),
69 int w = size_line_editor.rwidth() + size_browse_button.rwidth(),
70 h = qMax(size_line_editor.rheight(), size_browse_button.rheight());
106 name = QFileDialog::getOpenFileName(
this, tr(
"Open File"),
108 tr(
"All Files (*.*)"));
114 name = QFileDialog::getExistingDirectory(
this, tr(
"Open Directory"),
116 QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
121 if (!name.isEmpty() && !name.isNull())
BrowseLineEdit(const BrowseType type=file, QWidget *parent=0)
QPushButton * browse_button
void setText(const QString &str)
QSize minimumSizeHint() const