tags:

views:

123

answers:

3

When starting up a new project, as a beginner, which would you use?

For example, in my situation. I'm going to have a program running on an infinite loop, constantly updating values. I need these values to be represented as a bar graph as they're updating. At the same time, the GUI has to be responsive to user feedback as there will be some QObjects that will be used to updated parameters within that infinite loop. So these need to be on separate threads, if I'm not mistaken. Which choice would give the most/least hassle?

A: 

Your right threading is your answer. Use the QT threads they work very well.

Where I work when people start out using QT a lot of them start with designer but eventually end up hand coding it. I think you will end up hand coding it but if you are someone who really likes GUIs you may want to start with Designer. I know that isn't a definitive answer but it really depends.

Paul Hildebrandt
A: 

First of all, the requirements that you've mentioned don't (or shouldn't) have much affect on this decision.

Either way, you're going to have to learn something. You might as well investigate both options, and make the decision yourself. Write a couple of "Hello, World!" apps, then start adding some extra widgets/behavior to see how each approach scales.

Since you asked, I would probably use Qt Designer. But I'm not you, and I'm not working on (nor do I know much of anything about) your project.

Steve S
+1  A: 

If I understood your question correctly, updating the GUI has a little to do with the way you programmed it.

From my experience, it's easier to design a main window (or whatever your top level object is) in Designer, and add some dynamically updated content in a widget(s) created in your code. In most cases, it saves your time spent on digging through QT documentation, and additionally, you are able to visually inspect positioning, aligning etc.

You don't lose anything by using a Designer, every part of the GUI can be modified in your code afterwards, if it needs some custom behavior.

Having said that, without knowing all the details of your project is hard to tell which option (QT or in-code) is faster.

piobyz