Commit 4b252428 authored by LE BRETON Come's avatar LE BRETON Come
Browse files

Adds the final touch...

parent ebc627de
Pipeline #186187 passed with stage
in 0 seconds
......@@ -46,6 +46,12 @@
"doc": "It's a button",
"type": "dtk::d_bool"
},
"dir_browse": {
"label": "Open a dir",
"doc": "Open a directory.",
"path": "..",
"type": "dtk::d_path"
},
"file_browse": {
"label": "Open a file",
"doc": "Open a VTK file.",
......
......@@ -156,6 +156,13 @@
"widget_read_only": false
}
},
{
"parameter": {
"widget": "dtkWidgetsParameterDirBrowse",
"uid": "dir_browse",
"advanced": false
}
},
{
"parameter": {
"widget": "dtkWidgetsParameterFileBrowse",
......
......@@ -106,7 +106,7 @@ bool dtkWidgetsParameterBrowse::connect(dtkCoreParameter *p)
QObject::connect(d->push_button, &QPushButton::clicked, [=] ()
{
QString v = QFileDialog::getOpenFileName(this, "Open file", m_parameter->dirName(), m_parameter->filters().join(";;"));
QString v = this->browse();
m_parameter->shareValue(QVariant::fromValue(v));
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment