Answer the question
In order to leave comments, you need to log in
How to make a popup widget in QT?
Hello! I would like to make, say, a button and a text box. A number, say 5, is entered into the text box, and when the button is clicked, 5 more text boxes are created (the number of text boxes created is equal to the number entered in the first text box). How can this be done in QT? Thanks in advance.
How then to access the widgets created in this way?
Answer the question
In order to leave comments, you need to log in
Nothing difficult: when clicking, we read the number from the text box, in the loop we create the required number of text boxes, which we place in the desired layout using the setWidget method. The handler on the button can be hung with a slot or a lambda.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question