CTK icon indicating copy to clipboard operation
CTK copied to clipboard

Specific ctkFileDialog::setBottomWidget on selected file

Open finetjul opened this issue 10 years ago • 3 comments

It would be great if a different widget could be specified based on the selected widget

finetjul avatar Aug 19 '15 15:08 finetjul

small thing: in the body of the issue do you mean 'selected file' instead of 'selected widget' ; )

pieper avatar Aug 19 '15 15:08 pieper

My bad, I meant "selected file"

Note that for now, one can already disable the bottom widget: (using lambda functions)

connect(dialog, &QFileDialog::currentChanged, [bottomWidget](const QString& selectedFile) {
  QRegExp nameFilter("*.xml", Qt::CaseSensitivity::CaseInsensitive, QRegExp::PatternSyntax::Wildcard);
  bottomWidget->setEnabled(nameFilter.exactMatch(selectedFile));
});

(however, it does not work with multi selection)

finetjul avatar Aug 19 '15 15:08 finetjul

Also, the "Options:" label should be top aligned, and have a space before ":"

finetjul avatar Aug 20 '15 08:08 finetjul