CTK icon indicating copy to clipboard operation
CTK copied to clipboard

No CMake interface for definition USE_QFILEDIALOG_OPTIONS

Open phcerdan opened this issue 6 years ago • 5 comments

Used only in two widgets:

But I cannot find the place where that definition is managed in CMake.

Otherwise, it can be turned ON automatically for Qt versions greater than 4.7 and OFF otherwise. It is pretty convenient to use options in modern Qt. What do you think?

phcerdan avatar Aug 28 '18 14:08 phcerdan

Thanks for the report.

It makes sense to always enable this option and update the minimum required version. See https://github.com/commontk/CTK/blob/26478d25fba7596d185ee70e2c6d451de57d99c3/CMake/ctkMacroSetupQt.cmake#L60

Could you create a PR ?

jcfr avatar Aug 28 '18 15:08 jcfr

Also, my particular problem is that there is python interface to setOptions. So I cannot disable the option ShowDirsOnly.

I would like the user to be able to see the files, but only be able to select the folder. This can be done with the currently enabled setFileMode(QFileDialog::DirectoryOnly).

phcerdan avatar Aug 28 '18 15:08 phcerdan

Could you create a PR ?

Yes, on its way.

phcerdan avatar Aug 28 '18 15:08 phcerdan

I would like the user to be able to see the files, but only be able to select the folder.

If I understand, you would like the user to see both files and directories .. but only be able to select directories ?

jcfr avatar Aug 28 '18 15:08 jcfr

If I understand, you would like the user to see both files and directories .. but only be able to select directories ?

Exactly

phcerdan avatar Aug 28 '18 15:08 phcerdan