Whenever a displayed QBoxLayout is populated, there’s some flicker on the screen as widgets get added to the layout. How do I stop this flicker?
setUpdatesEnabled did not do the trick.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
show()the widget only after you’ve finished populating it/laying it out.Or don’t attach your layout to it’s widget before you’re done adding things to it. (i.e. only call
setLayout(your_layout)when you’ve finished adding things toyour_layout).Alternatively, look into theupdatesEnabledQWidgetproperty. You can use that to temporarily disable the widget’s updates to prevent flicker. (This is most useful on the more complex widgets likeQTableWidgetand similar when you are making “massive” changes to the underlying data.)Quote from the doc above: