Flickering of widgets when created with nullptr as parent



  • Hello everyone,
    I am trying to create two qwidgets and each of them have few dynamically created labels and checkboxes. The two widgets body is constructed using designer and layout is also provided here.Now when i create these widgets i provide nullptr as parent and later add them in the layout. But when i open up the the widget i can see a window for every label and check box for fraction of second and then i see in the layout. This action seems to be like flickering, and how can i avoid it. Thank you


  • Lifetime Qt Champion

    Hi,

    Please show the code you are using.


  • Moderators

    @VInay123
    simple answer: don't set a nullptr parent. Use a already hidden parent widget for example.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.