PDA

View Full Version : Qt Designer/Qt Creator do I understand the difference?



elglanto
22nd September 2016, 18:59
Hello there,

First, a bit of background so you can understand my needs. I work in experimental physics reseach and we usually control and read our devices with some basic code. In my group, we use Python for that. However, I would like to spend a bit of time to build GUIs to do that. The idea is that the GUI would use the already made Python codes that was developped in our lab and already used to talk with devices as written earlier. As an exemple, let's say we want to read the channel of an oscilloscope and save the data from this channel. Currently, we change the channel number in our code, run the code and the data is saved in the folder path written in the code. What I would like instead is a GUI on which I could display what is on the oscilloscope in real time, choose which channel(s) I want to display on my GUI and save the data when I click on a "save" button.

So, I would like to start playing around with GUI design and thus, would like to use Qt. However, after having installed Qt Creator and Qt Designer, I am not fully sure if I correctly understand the difference between them and which one is better to use for a given purpose and for my purpose.

For Qt Designer, it seems fairly obvious when you open it. It seems to be only to make GUI. But for Qt Creator, I am very confused. It seems to include everything Qt Designer can do but has much more options. Is that correct? For exemple, in Qt Creator, if I start a new project, I can choose Application => Qt Widgets Application which gives me something very similar to Qt Designer in the "Forms" section containing a "mainwindows.ui" file. However it also has more stuff such as an "Headers" section etc. for which I have no clue of their use.

In a nutshell, I don't understand what Qt Creator exactly does and if I would benefits form it for my purpose.

Thanks in advance for any help.

wysota
22nd September 2016, 19:58
Qt Designer is a standalone program for designing widget forms for Qt applications. Qt Creator is an Integrated Development Environment - an advanced project manager and code editor with a lot of extra features for developing using Qt. It comes with functionality of most standalone applications that come with Qt, including Qt Designer.

elglanto
22nd September 2016, 21:46
Thanks for your answer. So if I understand correctly:

In my case, I will use several already made Python classes/codes to control the devices, the GUI being mainly an interface between the user and those codes. If I want to create a proper application which runs without having to find pieces of Python code, I would have to use Qt Creator, make it such it can use Python code (as far as I understood, this is possible) and create a new project with all the Python code that I need to use in my GUI. Finally, I would have to compile it. On the other hand, if I use Qt Designer, it will make a .ui file that in have to transform into Python code with something like pyuic4. Then, it would still use the Python classes/codes.

Am I correct?

wysota
22nd September 2016, 22:43
Whether you use Qt Creator or not is your own preference. If you have a favourite code editor, use that.