Hi,
I use xfce on debian, where the file dialogs normally come from Gtk+. So it bothered me, that FC do not use the native file dialogs from the system, but the ones from Qt. The only exception I found till now, is the import dialog from a2plus, which uses the system dialogs.
I don't want to offend anyone, so just say, I don't like the Qt dialogs. So I searched for a fix. The preferences don't offer a switch. The settings from the Qt configuration tool seem to be ignored. In the sources of Gui/FileDialog.cpp I found, that the use of the native dialogs has at least a configuration key. Adding this key in my ~/.FreeCAD/user.cfg helped and now FC uses the system dialogs.
From my point of view, the use of the native system dialogs should be the default. Because the user could simply set it system wide with the Qt settings tool. This gives FC a consistent look to the other programs, and it does not look like an alien like ie. Java programs.
Cheers, detlef
Native file dialogs
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Native file dialogs
Hi,
Unfortunately there have been some troubles saving/opening files with system dialogs, especially the one from Gnome...
That's probably why the default is set to the Qt dialog.
Unfortunately there have been some troubles saving/opening files with system dialogs, especially the one from Gnome...
That's probably why the default is set to the Qt dialog.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Native file dialogs
The GTK one was saving files as all lower-case (a problem since our extension is .FCStd). But I was under the impression QT Dialogs weren't the default.
In any case, I think you can switch that off with a command-line parameter or maybe an option in the preferences? Not sure.
In any case, I think you can switch that off with a command-line parameter or maybe an option in the preferences? Not sure.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Native file dialogs
I would much prefer the native dialogue myself, unfortunately it is utterly broken in GNOME, the file extension isn't added automatically when saving a new file; already saved files can't be opened again if they don't have the file extension.
I'm not sure why that is, if it's a Qt bug but it has existed for a long time.
I'm not sure why that is, if it's a Qt bug but it has existed for a long time.
Re: Native file dialogs
You are right, that the file extension is not added automatically is bad. I have no clue about C++ , but nevertheless I will try to fix it.
Re: Native file dialogs
For enabling or disabling such support:
https://forum.freecadweb.org/viewtopic. ... 80#p273068
As others have already pointed out, currently a lot of issues can be expected. And there is no easy fix to improve things.
https://forum.freecadweb.org/viewtopic. ... 80#p273068
As others have already pointed out, currently a lot of issues can be expected. And there is no easy fix to improve things.
Re: Native file dialogs
Thank you for the link.triplus wrote: ↑Tue Apr 02, 2019 12:03 am For enabling or disabling such support:
https://forum.freecadweb.org/viewtopic. ... 80#p273068
In the last days I dug much in FCs Code, specially all the different uses of the file dialogs. Yes, it is complicated and every module does it a little bit different.As others have already pointed out, currently a lot of issues can be expected. And there is no easy fix to improve things.
The big thing that bugs me with the gtk file dialog is, that it does not append the suffix to the file name, like the qt dialog does. And with the qt dialog it is annoying, that it does not reminds it's size if I have pulled it larger. I know that this are small issues, but from my point of view, software should be as handy as possible. Every little disturbance distracts me from the real work.
For now I'm happy, that I have managed to build my first little qt program, where I can play a little bit around with C++, qt and file dialogs. May be, some day I get to a good solution