P
P
Paul2016-12-16 14:54:14
User interface
Paul, 2016-12-16 14:54:14

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?
e4c8302f663149c98f4d54fa1b3da5b2.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2016-12-16
@vitali1995

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.

J
Jacob E, 2016-12-16
@Zifix

Read any tutorial on Qt version 4 or higher - save a lot of time on such elementary questions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question