Disable showing the xml of edited .ui files
-
Is it possible to disable showing the xml of a .ui file when switching back from design mode to code? It is very annoying to look for the implementation files of the form class every time even if you just make small changes.
I mean what’s the point of showing the xml at all, when one isn’t supposed to fiddle around with it anyway? -
No, that's not possible.
While it may look annoying to some users, there are two issues:- What else? After all, the ui file is currently open. What should be opened in the editor instead? Should it remain empty? Or jump to the next valid file? And if so, what's valid? cpp/h files? Resource files?
- The XML file is what is actually processed during compilation. It may even be interesting for some to check.
-
I think the underlying question is probably closer to:
if you switch from code to design mode, why is the 'code' tab not linked to the CPP file and the design tab to the UI file, so switching is about the unit of them. Thereby hiding the fact that the widget being designed happens to be an XML file under the hood.
So, similar to F4 switching between source and header, 'edit' and 'design' can switch between ui and cpp.
(natually, a user can still click on a ui file in the edit and thus give themselves the xml view, but that sounds less than useful for most)
-
@TomZ said in Disable showing the xml of edited .ui files:
So, similar to F4 switching between source and header, 'edit' and 'design' can switch between ui and cpp.
Because there is no relation between the source and the ui file except the name. You can name it whatever you want, you can load more than one ui file in one cpp file, ...
-
I InTheBeninging has marked this topic as solved
-
@Axel-Spoerl said in Disable showing the xml of edited .ui files:
- What else? After all, the ui file is currently open. What should be opened in the editor instead? Should it remain empty?
Actually yes, or just let it be at the state it was before (any cpp file that was opened before).
- The XML file is what is actually processed during compilation. It may even be interesting for some to check.
I think the times one wants to go back to actual code that was worked on before outweighs the times of wanting to have a look at the underlying xml by far. The problem is that once you go back to text edit mode the projects explorer selects the opened ui/xml file and now i have to rethink on where my initial file was. @TomZ is right, if want to look at the xml i can still do this explicitly, but opening an ui file twice in the texteditor and in the designer per default is just an annoying experience.