Skip to content

joejoe909/LiquidWindow

Repository files navigation

Liquid Window

Liquid Window is my current effort to make a lightweight class that allows for customization of the Title bar and the window itself. Currently the Title bar is simply a widget, drag functionality exists in the main window area itself. I made this code to help you along on this same journey. I invite you to clone, fork, and make pull requests. I welcome improvements and constructive critiques on my code. You're free to use this in your project.

Currently the LW is building on 6.1.3 on Linux Ubuntu (use the GCC compiler) and MSVC2019 on Windows 6.1.0.

Liquid Window is based on the resizeable widget code found at https://wiki.qt.io/Widget-moveable-and-resizeable but has been adapted for use as an upper level, parentless Widget. If you need a resizeable Widget this is where you want to go! This class/.h,.cpp file is called tcontiner is included in this repo for your reference.


Why this code is useful.


If you're delving in QML or doing anything with Qt at some point you will want to customize the look of your application window. This will allow speedier learning and development and ultimately more customization of your application.


Usage:

use it as you would QMainWindow() but instead use LiquidWindow()

#include "LiquidWindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    LiquidWindow w;
    w.show();
    return a.exec();
}


Feel free to fork, create a pull requests and improve on this code. Feel free to use it in your projects.

To Do List:


  • Refine the TitleBar() class
  • Add buttons to control Min/Max/Restore/Close to TitleBar().
  • Add functionality that will allow customization via QSS/CSS.
  • Add functions that will allow customization via C++ function calls.

Credits:
  • Aleksey Osipov
  • Joe Farrish

About

Custom Window

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published