Opening projects and getting started
-
@jsulm said in Opening projects and getting started:
@Bryan-Kelly said in Opening projects and getting started:
This is where I expect/hope to find the ability to add a new dialog.
It was actually already explained here.
But I will repeat: go to File/New File or Project..., select Qt on the left side, then select Qt Designer Form, in next step you can select a Dialog as template. Don't know how else to explain this. Maybe you should follow the suggestions?Yes, that worked out well. I have no excuse for not recognizing the right method much earlier in this conversation.
So again, to each respondent, thank you for your time and patience. -
@Bryan-Kelly here is no method to utilize drag and drop to create multiple dialogs.
Excuse my English - but - are you in effect saying DRAG AND DROP TO CREATE / DUPLICATE DIALOG PROJECT?
I am not nitpicking on your statement,
but
there is a difference between that and "drag and drop" objects in SAME dialog.Actually even (opening) projects - plural - is little misleading.
-
@Bryan-Kelly as you are starting with Qt, i would advise you to use qt books.Inside you can better learn qt features.Some are:
9781786467126-MASTERING_QT_5
[Trolltech]Qt4 Examples And Tutorials
c-gui-programming-with-qt-4-2ndedition
AdvancedProgramming wit Qt
Hands-On-GUI-Programming-with-CPP-and-Qt5
Foundations of Qt Development
Qt5 cadaques.Some may be old , but you will learn a lot from them.
-
@AnneRanch The intent was something on the order of: Begin with a just created project, use the defaults. Open mainwindow.ui. This opens a tool dialog of controls to drop on the dialog. Somewhere in that tool dialog is, or more correctly, I suggest there be, a tool called "dialog" Drag and drop this somewhere, maybe outside the currently existing dialog to create a new dialog. Go from there.
Yes, that presents some problems, but, that is the basic concept I was searching for. The provided answer was good and does the job.
I slightly modify the earlier given instructions to:
File -> New File -> Qt Designer Form Class (rather than Qt Designer Form)
This provides not just a dialog but a dialog with an associated class for the stuff to be done within the dialog.@Ronel_qtmaster Thanks for the list of books. I am working on selecting and ordering one. I will probably go Amazon to get a Kindle version, but, will look and try to find a PDF of one rather than Kindle. Kindle is OK but has some drawbacks, the biggest of which is Kindle does not have smooth scrolling. It only moves a complete page at a time which is often quite inconvenient.
-
@Ronel_qtmaster I purchased the Kindle version of Mastering Qt 5. The first goal is a series of Line Edit controls to entering and displaying numbers. A search for qlineedit in the book yields 7 results. All of them are example within lines of code. None of them are explanations on using the tool, QLineEdit.
Searches for text such as
how to use qlineedit for numbers c++
returns some examples, but no discussions on how to use it. To state in other words, a page, or several on the topic of QLineEdit and various ways to use it. Of course, the same is hoped for regarding other tools.An example: I can right click on a line edit tool then click "go to slot" This generates a function names on_le_step_a_returnPressed(). The actual function appears to be returnPressed(). How can I determine or discover all the available functions without having to create and test each one?
Using QLineEdit as an example, are there any web sites or books that list various tools such as this and how to use them?
-
@Bryan-Kelly
I am afraid your questions/requests are just too specific. The books are what they are, and they cover what they cover. I don't think you will find anything which goes into detail on e.g. every widget type, but good luck if you find what you are looking for.That apart, for the case of "how to use qlineedit for numbers" the answer is: don't! Use a dedicated
QSpinBox
for integers andQDoubleSpinBox
for floating point ones. -
@JonB said in Opening projects and getting started:
@Bryan-Kelly
I am afraid your questions/requests are just too specificSeems to me, noted specificity is a major reason forums such as this exist. Sometimes people just cannot find the exact syntax for what is needed, even when the general concept is known.
I now know how to create those dialogs and it is simple and logical.
Thanks for your time and patience.
-
-
@Bryan-Kelly Can I ask why there is not any tutorial online about the relationship between source files and UI files and how to work with them? It seems that it is a particularly critical skill and IMHO it's explained only in bits and pieces online and not well.
-
@Mlibu said in Opening projects and getting started:
Can I ask why there is not any tutorial online about the relationship between source files and UI files
-
@Christian-Ehrlicher Ok it is explained much better in the Qt Widget documentation I guess. I was looking at QML/Qt Design Studio documentation when I had the issue. Thanks for pointing that out. I didn't even know UI files were a thing in Qt Designer. I'll look at the Qt Designer docs too. This probably explains why I was having trouble finding any info. I guess I should be watching Qt Designer tutorials as well.