Question

I am wondering which way is the best to start building a GUI+SOFT in Qt. I am trying to build a sound media player based on a MVC pattern. Until now i have found 3 ways to do so.

1- Should I use a .ui file thanks to Qt designer, is it flexible enough ?

2- Should I use QML to make the design than integrate it to a C++ development ?

3- Should I just start from scratch and do it by hand without Qt Designer and using Qt library ?

Thank you very much for your answers.

Was it helpful?

Solution

I prefer building UI completely from scratch. This gives a lot of flexibility and better understanding of what is where, but on the other hand changing layout sometimes is a big headache.

OTHER TIPS

NOTE: I'm using PyQt, so my comment may not be the most relevant.

I found Qt Designer to be great to create UIs, but then, when comes the time to modify them later, it becomes somewhat of a problem. Inserting new elements in an existing layout is often tricky, and you have to break all your layouts and re-assemble them (hoping you didn't mess anything up). Moreover, if your app is not trivial, you'll likely end up with code "fixing" what the .ui can't do. There are other tricky cases like that, but I don't remember them right now.

I ended up getting rid of my .ui files. So what I'd recommend is to initially use the designer to create the UI, and then use only the generated code from that point forward.

If you want your UI to be animated and it is not a requirement to follow platform UI appearance, QML is by far the best way to achieve this. If you want a UI that appears like any other application on your system and has limited animation then stick with QtDesigner and standard widgets.

I would use Qt Designer, as this is the easiest method IMHO.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top