Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
-
any use of the (non-native) QFileDialog for creating a new directory
Description
The current behavior of the (non-native) QFileDialog for creating a new folder (upon pressing the "Create New Folder" action) is naming the new folder "New Folder" (or the respective translation thereof).
There seems to be no way to change this behavior (other than some hacks like temporarily installing a translation). For some use cases, it would be very handy to have control over the default name. One use case would be the creation of 'hot folders' where the name of the hot folder depends on some user setting. Also note that the "New Folder" terminology is inconsistent with the remainder of the file dialog that speaks of "Directories" rather than "Folders".
One solution would be to add two extra methods to the QFileDialog class for getting and setting the default new folder name (like "QString QFileDialog::defaultNewDirectoryName() const" and "void QFileDialog::setDefaultNewDirectoryName(const QString &newdirectoryname)".
Another solution would be to add one extra virtual method to the QFileDialog class for getting the default new folder name (like "virtual QString QFileDialog::defaultNewDirectoryName() const', where the default implementation would return "tr("New Folder")". A derived class could then override this method.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-74826 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
257578,1 | WIP: Add environment variables for settings-related application arguments | master | qt-creator/qt-creator | Status: ABANDONED | -2 | 0 |