All Projects → Jorgen-VikingGod → Qt Frameless Window Darkstyle

Jorgen-VikingGod / Qt Frameless Window Darkstyle

simple MainWindow class implementation with frameless window and custom dark style. It adds also support for titlebar and buttons (minimize, maximize, close)

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Qt Frameless Window Darkstyle

Qdarkstylesheet
A dark style sheet for QtWidgets application
Stars: ✭ 1,952 (+210.83%)
Mutual labels:  dark-theme, qt, qt5, stylesheets
Heimer
Heimer is a simple cross-platform mind map, diagram, and note-taking tool written in Qt.
Stars: ✭ 380 (-39.49%)
Mutual labels:  qt, qt5
Qss
QT Style Sheets templates
Stars: ✭ 344 (-45.22%)
Mutual labels:  qt, stylesheets
Notes
Note-taking application, write down your thoughts.
Stars: ✭ 612 (-2.55%)
Mutual labels:  qt, qt5
Screencloud
Screenshot sharing application for Windows, Mac and Linux.
Stars: ✭ 537 (-14.49%)
Mutual labels:  qt, qt5
Lan Share
Cross platform LAN File transfer application built with Qt C++ framework
Stars: ✭ 317 (-49.52%)
Mutual labels:  qt, qt5
Nheko
No longer maintained - Desktop client for the Matrix protocol (active fork https://github.com/Nheko-Reborn)
Stars: ✭ 410 (-34.71%)
Mutual labels:  qt, qt5
freeLib
freeLib - каталогизатор для библиотек LibRusEc и Flibusta
Stars: ✭ 19 (-96.97%)
Mutual labels:  qt, qt5
Quaternion
A Qt5-based IM client for Matrix
Stars: ✭ 438 (-30.25%)
Mutual labels:  qt, qt5
Singleapplication
Replacement of QtSingleApplication for Qt5 with support for instance communication.
Stars: ✭ 443 (-29.46%)
Mutual labels:  qt, qt5
Qview
Practical and minimal image viewer
Stars: ✭ 460 (-26.75%)
Mutual labels:  qt, qt5
Qxmpp
Cross-platform C++ XMPP client and server library
Stars: ✭ 300 (-52.23%)
Mutual labels:  qt, qt5
Raspberry Pi Cross Compilers
Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
Stars: ✭ 261 (-58.44%)
Mutual labels:  qt, qt5
Qxlsx
Excel file(*.xlsx) reader/writer library using Qt 5 or 6. Descendant of QtXlsx.
Stars: ✭ 340 (-45.86%)
Mutual labels:  qt, qt5
Project lemonlime
为了 OI 比赛而生的基于 Lemon + LemonPlus 的轻量评测系统 | 三大桌面系统支持
Stars: ✭ 255 (-59.39%)
Mutual labels:  qt, qt5
Qhttp
a light-weight and asynchronous HTTP library (both server & client) in Qt5 and c++14
Stars: ✭ 394 (-37.26%)
Mutual labels:  qt, qt5
Qt.go
Qt binding for Go (Golang) aims get Go's compile speed again.
Stars: ✭ 487 (-22.45%)
Mutual labels:  qt, qt5
QDashBoard
Sample dashboard developed with QML. Login, plots and several screens.
Stars: ✭ 34 (-94.59%)
Mutual labels:  qt, qt5
QtDemos
This is the collection of Qt demos to solve the problem from StackOverflow or I faced.
Stars: ✭ 23 (-96.34%)
Mutual labels:  qt, qt5
Qt Advanced Docking System
Advanced Docking System for Qt
Stars: ✭ 422 (-32.8%)
Mutual labels:  qt, qt5

Qt Frameless Window with DarkStyle

simple MainWindow class implementation with frameless window and custom dark style.

It adds also support for titlebar and buttons (minimize, maximize, close)

Look is based on the VS2013 application window (flat and frameless window)

Screenshots
mac enabled mac disabled

Qt and OS

  • tested with Qt5.5.0, Qt5.9.0 and Qt5.10.0
  • tested on Windows 7, Windows 10,MacOSX 10.12.5 and MacOS 10.13.2

PyQt5

Here is an unofficial Python port of my implementation.

How to use

  • add additional include plath to framelesswindow
  • add resources framelesswindow.qrc and darkstyle.qrc
  • add #include "framelesswindow.h" into main.cpp, create window FramelessWindow framelessWindow; and assign your mainwindow object as content framelessWindow.setContent(mainWindow); and show it framelessWindow.show();
  • add #include "DarkStyle.h" into main.cpp and call a.setStyle(new DarkStyle);
#include <QApplication>
#include "DarkStyle.h"
#include "framelesswindow.h"
#include "mainwindow.h"

int main(int argc, char *argv[])
{
  QApplication a(argc, argv);

  // style our application with custom dark style
  QApplication::setStyle(new DarkStyle);
  //QApplication::setPalette(QApplication::style()->standardPalette());

  // create frameless window (and set windowState or title)
  FramelessWindow framelessWindow;
  //framelessWindow.setWindowState(Qt::WindowMaximized);
  //framelessWindow.setWindowTitle("test title");
  //framelessWindow.setWindowIcon(a.style()->standardIcon(QStyle::SP_DesktopIcon));
  
  // create our mainwindow instance
  MainWindow *mainWindow = new MainWindow;

  // add the mainwindow to our custom frameless window
  framelessWindow.setContent(mainWindow);
  framelessWindow.show();

  return a.exec();
}

features

  • frameless window
  • custom dark style (based on Fusion style with dark palette and custom stylesheets)
  • title bar
  • buttons (minimize | restore | maximize | close)
  • move window by drag the title bar
  • dobule click title bar to toggle between window styte (maximize and normal)
  • use of native events, like minimizing or system menu

todo

thanks

Many thanks goes to the Qt Forum and especially to Chris Kawa for pointing me to some usual issues and hints of great must have features.

Licence

The MIT License

Copyright (c) 2018, Juergen Skrotzky (https://github.com/Jorgen-VikingGod, [email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].