Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question