Qt5.3 qml applicationwindow Setting window borderless problem

Source: Internet
Author: User

This version of QT is a bit of a bug here.

Set The Flags property of Applicationwindow to Qt . Framelesswindowhint does make the program borderless, but the program also has no icon on the taskbar.

See document Discovery Applicationwindow is realized by Qquickwindow, and Qquickwindow is inherited from QWINDW.

Create a Qwindow object directly experiment, the code is as follows

Qwindow window;window.setflags (Qt::framelesswindowhint); Window.setwidget (window.setheight); window.show ();

Compile run unexpectedly even a window is not, later I changed the code, as follows:

Qwindow Window;window.setwidget (window.setheight); Window.show (); Window.setflags (Qt:: Framelesswindowhint);

Put Window.setflags (qt::framelesswindowhint); after calling show (), everything is fine, and the icon on the taskbar doesn't go away.

However, the bug came, the program exit after the taskbar icon will not disappear, you must click on the mouse or wait a while to disappear, other problems have not yet found

Now I know that after the window display and then set the flags, so I added a timer in the QML, the time is 1 milliseconds, running for ture, after the trigger timer and then set the flags.

The 1-Millisecond delay window must have been shown, and it would be OK to set the flags again.

Related Article

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.