Skip to content

Base class implementation for Qt Widget projects which need to have a customized non-client area. By inheriting QWidget and using QCustomTitleBar as replacement for the OS's default one, QCustomWindow counts on many of its parent resources, providing a customized non-client area.

License

Notifications You must be signed in to change notification settings

Nintersoft/QCustomWindow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QCustomWindow

QCustomWindow (former QCustomTitlebar) is a project in which its main class (QCustomWindow) inherits its properties from QWidget, wrapping a QMainWindow class instance.

It basically consists of a customized widget providing a customized non-client area which wraps a QMainWindow, as represented in the following image:

QCustomWindow simplified layout
Fig. 1: QCustomWindow simplified layout.

Screenshot

Regular-sized custom window in light theme
Fig. 2: Regular-sized custom window in light theme.

Please, refer to screenshots for more images.

Support and Documentation

Docs elaboration is still in progress :( ...
Should you have any doubts, do not hesitate in contacting me through my email.

Features:

  • Dynamic pointer styles;
  • Compatible with Qt5 and Qt6;
  • Customized stylesheet (light theme);
  • Uses new QWindow's move/resize API by default (use QCustomWindow::setForceCustomMove(bool) and QCustomWindow::setForceCustomResize(bool) so as to change behaviour);
  • Window title update (QWidget::setWindowTitle(QString)) working properly;
  • Better performance (when compared to previous versions);
  • Direct access to QMainWindow instance (without restricted access to its methods and properties);
  • Dynamically Linked Library (DLL) binaries available for Windows.

Observations:

  • Should you use a QStatusBar, it is strongly recommended that you provide at least a basic stylesheet which removes its borders as well;
  • Limitations from release v2.x are no longer an actual issue.

Distribution (available versions):

  • DLL + LIB + headers;
  • Stactic linking/source files;
  • Qt Creator/Designer plugin.

CustomTitlebar open source code

  • You can download and make modifications in the source code, accordingly to Mozilla Public Licence v2.0 terms;
  • The licence is available in the root of the project directory and must be always shipped with it.

About

Base class implementation for Qt Widget projects which need to have a customized non-client area. By inheriting QWidget and using QCustomTitleBar as replacement for the OS's default one, QCustomWindow counts on many of its parent resources, providing a customized non-client area.

Topics

Resources

License

Stars

Watchers

Forks