The Qt Subwindow is embedded in the parent window (no border with show)

Source: Internet
Author: User

Sometimes it is necessary to embed a child window into the parent window.

We can do this.

1. Create a new subclass of Qwidget or Qdialog ClassA (parent class is CLASSB)

2. Add the Settings window property in the new class's constructor

[CPP] view Plaincopyprint?

  1. Setwindowflags (qt::customizewindowhint| Qt::framelesswindowhint);

Closes the default window caption prompt and a window without Borders.

3. Called in the parent window.

[HTML] view Plaincopyprint?
  1. ClassA *a;
  2. A = New ClassA (this);
  3. A->show ();

Show it where it's going to show.

Reference: http://blog.csdn.net/kfbyj/article/details/8841525

The Qt Subwindow is embedded in the parent window (no border with 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.