Home

Awesome

Qt-Nice-Frameless-Window

Qt Frameless Window for both Windows and OS X, support Aero Snap, drop shadow on Windows, and support Native Style such as round corner, drop shadow on OS X. Based on QMainWindow.

基于 QMainWindow 实现的效果很好的 Qt 无边框窗口,支持 Windows 和 OS X 系统。在 Windows 上,支持窗口阴影、Aero 效果等;在 OS X 上,支持原生窗口样式,比如窗口圆角、窗口阴影、三个系统按钮(关闭、最小化、最大化)等。

996.icu LICENSE

Screenshots

WindowsOS X
screenshot on Windowsscreenshot on OS X

How to use

Just use class "CFramelessWindow" as the base class instead of QMainWindow, and Enjoy!

Method 1

If you want to create a new project, then method 1 should be used.

  1. Create a new Qt subproject project say myproject.pro, just like Qt-Nice-Frameless-Window.pro.

  2. Copy folder "framelesswindow" and "projectinclude" to myproject path, the project directory structure should be looked like this:
    -myproject/
      -myproject.pro
      -myproject.pro.user
      -framelesswindow/
      -projectinclude/

  3. Add "SUBDIRS += framelesswindow" in myproject.pro and run qmake.

  4. Add a sub project say myapp.pro to myproject.

12
  1. Add "myapp.depends = framelesswindow" in myproject.pro and run qmake.
  2. Add "include (../projectinclude/common.pri)" in myapp.pro and run qmake.
  3. Right click on myapp.pro, and click "add library", a dialog will pop up, choose "interal library" and click next step again and again.
123
  1. After step 7 is done, something will be added into the myapp.pro file automaticly, run qmake again.
  2. Use class "CFramelessWindow" as the base class instead of QMainWindow.

Method 2

If you already have a project say myproject.pro, then method 2 should be used.

  1. Copy file "framelesswindow.h" and "framelesswindow.cpp" and "framelesswindow.mm" to myproject path.
  2. Add these lines to myproject.pro, then run qmake.
HEADERS += \
    framelesswindow.h

win32{
	SOURCES += \
		framelesswindow.cpp
}
macx{
    OBJECTIVE_SOURCES += \
		framelesswindow.mm
    LIBS += -framework Cocoa
}
  1. Use class "CFramelessWindow" as the base class instead of QMainWindow.
12

Windows Specific

OS X Specific

Platform

Acknowledge