> While my Qt apps are very much coded against Qt, it’s actually pretty easy for me to currently switch them to other UI frameworks as needed.
Are yours apps open-source or do you know some architectured in the same way ? Curious and interested to dive into a well designed Qt application with logic and UI separation.
Unfortunately none of my Qt code is open source.
Re:Krita, OpenGL and Qt
by freedomben on Saturday July 18, 2020 @11:49AM
(#23882163)
Second this. I love context-based organizations like newer versions of Phoenix default to. I've been using that in apps for years.
Basically all of the application UI is in framework-independent code. When plugging in the UI portion, you never do logic on stuff, you just call functions/methods to get it done.
It's not perfect, but it makes it much easier to port to a different framework/toolkit in the future.
If you keep your logic separate from your UI, and interact via method calls, it’s not very hard to swap out the underlying object. Arguably, it’s the pattern Qt encourages anyway so that you can flexibly change your UI design in the future