Precautions for re-setparent of widgets in QT

Source: Internet
Author: User

Sometimes you need to re-setparent In the widget, but you will find that setparent sometimes has problems, such as the Child window is not flushed out.

In fact, it should be noted that, as mentioned in the QT document, if you reset the parent in the current widget, the default value is invisible. In fact, this is a problem because there are two situations.

The first case is that before the parent window shows, you setparent. At this time, you will find that when you call show in the parent window, the Child Window will still come out.

The second is what the QT document wants to express,Only when the parent window is showYou can setparent to the parent window, and then you need to display the show.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.