QT 5.1 allows Qwebview to automatically resize with window size

Source: Internet
Author: User

Sometimes we do software, we need to put a map in the Qwebview and so on, need to let qwebview with the size of the window to adjust automatically. To implement this feature, you do not need to use the code, the layout can be done. How to do it with the code, I will not, also did not study.

In the first step, open Mainwindow.ui, in design mode, find the right Qmainwindow, right-click, choose layout---> Grid layout.

In the second step, put a "grid layout" on it, then put a Qwebview control on "Grid Layout", then right-click on the Qwebview control, select "ancestor" in an option, and select "Grid Layout".

This will automatically resize. I personally do not understand what layout, specific is so operation, I also blind operation out.

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.