-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Improve usability of Directory Button by using native dialog #973
ENH: Improve usability of Directory Button by using native dialog #973
Conversation
Thank you for working on this. Native file dialogs are now probably preferred by most users, so I think it is a good idea to use them by default. Is there a reason why you switched from ctkFileDialog to QFileDialog instead of just using the |
I switched from ctkFileDialog to QFileDialog because the customizations of ctkFileDialog appeared to be mostly related to modifying the functionality of a Qt widget-based dialog. So switching to the native file dialog is essentially going back to using a QFileDialog without those additional customizations. We can't just remove the following CTK/Libs/Widgets/ctkFileDialog.cpp Lines 130 to 135 in 01ab373
|
The extra features don't have to be deleted, but they would only be used if dontusenativedialog flag is enabled. |
Thanks for the updates. These small changes are much less likely to cause any regressions in any CTK-based projects. Just need to sort out those few syntax errors. |
b777d11
to
e96dc1d
Compare
e96dc1d
to
10824ae
Compare
I've pushed an update based on @finetjul 's suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I had just two comments that should be easy to address.
10824ae
to
858ed65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this looks good to me.
SIGNAL(selectionChanged(QItemSelection,QItemSelection)), | ||
q, SLOT(onSelectionChanged())); | ||
this->UsingNativeDialog = !(q->options() & QFileDialog::DontUseNativeDialog); | ||
if (!(this->UsingNativeDialog)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(this->UsingNativeDialog)) | |
if (!this->UsingNativeDialog) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed commit with change to #977
This aims to improve directory selection by using the native dialog instead of Qt's own widget-based dialog design.
See 3D Slicer forum discussion of how users have been doing other methods to avoid using widgets that use Qt's widget-based dialog.
https://discourse.slicer.org/t/using-native-file-dialog-for-selecting-files-and-folders/17926