qt Remove frame After window drag and drop control size and move window

Source: Internet
Author: User

Reaper, Application platform: QT

In general, we write a window, there is a standard window frame, this standard framework provides a title bar and border, and the border can help us to control the size of the window by drag and drop, for example, when the mouse pointer is placed on the top border, the pointer mouse changes, then press the left mouse button while dragging the mouse, You can change the size of the window, similarly, when the mouse pointer to the left, right, Four corners, the mouse pointer will change the corresponding changes, but sometimes, we do not need the standard window frame, this time, we can set the top-level window (top-level) Properties qt:: Framelesswindowhint, if you still need to preserve the display or Minimize window when clicking on the taskbar, add Property Qt::windowsystemmenuhint | Qt::windowminimizebuttonhint. In this way, in addition to the standard framework, only the customer area (Mfc,win32 concept), a lot of software interface to remove the standard frame, and then beautify, such as QQ, thunder, cool Dog, and so on, there is no windows normal window border and title bar.

But this has lost the border to give us the function to detect the position of the mouse, change the shape of the pointer, drag to change the size of the window. For QT platform, I wrote a DLL, which contains the code to implement the framework of the table frame these functions, in addition, because there is no title bar, the window in the title bar to press the mouse to move the window function is also lost, this DLL also completed this function.

As for the use of the output function in this DLL, it is already described in the header file.

Debug Version: http://download.csdn.net/detail/xinzhiyounizhiyouni/8521407
Release version: http://download.csdn.net/detail/xinzhiyounizhiyouni/8521413

This article: CSDN blog

qt Remove frame After window drag and drop control size and move window

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.