Wpf For QtCreator
-
wrote on 13 Jun 2024, 13:53 last edited by
Hi! I would like to know if it is possible to create the same windows as shown in the video below using QT Creator? link text
-
Hi! I would like to know if it is possible to create the same windows as shown in the video below using QT Creator? link text
wrote on 13 Jun 2024, 15:07 last edited by@Lucas-Lorenco-Alves said in Wpf For QtCreator:
if it is possible to create the same windows as shown in the video below using QT Creator? link text
QtCreator is just the IDE, it does not create anything.
The Qt Framework has a lot of options and almost any widget you can think of is kinda possible either because it's available or can be built as custom widget design.
So, even without seeing the video (you need to sign in into Google Drive for that), I would say yes. -
wrote on 13 Jun 2024, 16:25 last edited by
Thank you for the clarification and for answering my question. While we're on the subject, I have some questions about QT. I know there is a way to create windows using only the classes available on the site and another way by dragging elements into the field. Is there a difference between them?
-
Hi,
The difference is that when using designer you have an additional file containing your UI in xml format that will get feed to a code generator.
Performance wise, it won't change anything.
-
Thank you for the clarification and for answering my question. While we're on the subject, I have some questions about QT. I know there is a way to create windows using only the classes available on the site and another way by dragging elements into the field. Is there a difference between them?
wrote on 13 Jun 2024, 17:59 last edited by Pl45m4@Lucas-Lorenco-Alves said in Wpf For QtCreator:
I know there is a way to create windows using only the classes available on the site and another way by dragging elements into the field. Is there a difference between them?
You mean QtCreator's Design mode or QtDesigner vs. writing the GUI code manually?
When you use the Forum search you will find a lot topics on this.No, there is no difference. It results in the same behavior and same design.
But at some point the "drag and drop" QtDesigner reaches its limits because you have only the basic widgets there. So, for more complex designs you need to add things through coding.Btw:
When using the Designer, it outputs a*.ui
file, which is basically your design as some XML style file.
Because C++ code needs to be compiled, a file like this is pretty much unusable. Therefore there isUIC
(User Interface Compiler), which translates yourclass.ui
file into a compilable C++ header (namedui_class.h
by default).You can open this file and check yourself what your "drag-n-drop" design would look like in C++ code only.
As a beginner and for simple apps, you can use this and you will probably end up with some hybrid solution.... some basic template created in Designer and then add more things by code.
As you get more experienced, you will enjoy creating GUIs without Designer :)Some helpful links to the documentation
- https://doc.qt.io/qt-6/designer-using-a-ui-file.html
- https://doc.qt.io/qt-6/designer-ui-file-format.html
UIC
- https://doc.qt.io/qt-6/uic.html
If you use QtCreator and C++, UIC runs automatically in the background.
If you use the standalone QtDesigner and design GUIs for a later use in combination with a Qt app written in Python (PySide or PyQt), you need to "translate" your UI files yourself.
-
wrote on 13 Jun 2024, 19:37 last edited by
Thank you very much for the support and explanation. I really enjoyed the interaction, and it broadened my horizons. Thank you once again.
1/6