S
S
Saharman2018-06-09 11:32:07
Qt
Saharman, 2018-06-09 11:32:07

Storing pointers to widgets in a vector?

Now I have an algorithm that, one by one, creates a custom widget from the data and immediately adds it to the main screen. I want to distinguish between drawing the interface and working with data, so I thought about creating a vector that will store pointers to these widgets, and then, somewhere else in the program, I will take and draw them. Does it have a big impact on performance?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2018-06-09
@Saharman

You can do that, but it doesn't make much sense.
If your interface is generated for a noticeably long time, then show the user a splash screen where something is spinning or progress is somehow displayed. The QSplashScreen class is here to help. Widgets can be added directly to the main form immediately, nothing will start to be drawn until the form is shown.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question