Giter Site home page Giter Site logo

w1146869587 / qt-framelessnativewindow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ochrazy/qt-framelessnativewindow

0.0 1.0 0.0 26.67 MB

WIP - Qt-Frameless-Window with native OS feature support

C++ 75.96% Objective-C++ 21.11% Objective-C 1.19% QMake 1.74%

qt-framelessnativewindow's Introduction

Qt-FramelessNativeWindow

This project is work in progress.

The Qt-FramelessNativeWindow is a frameless Qt Desktop Window with added support for native OS-features. A frameless Window has no title bar and needs custom close, minimze and maximize buttons. The class FramelessWindowConverter converts existing native windows and turns them into frameless ones with all of the expected native os features. It only uses native os calls and is completely independent of Qt. As the name suggests FramelessWindowConverter does not create a window at all but rather works by filtering native OS Events. In the example Qt-Application MachineClicker the FramelessWindowConverter is used to get a frameless window. Supported platforms are Windows 10, macOS and Unix/Linux. Tested with Qt 5.11.2.

The native OS features supported are:

  • Resizable
  • Draggable
  • Minimize animation
  • Aero shake (Windows only)
  • Aero snap (Windows only)
  • Window snapping (Unix/Linux only)
  • Window drop shadow (To work on Windows and Linux WA_TranslucentBackground has to be false)
  • Optional support for original traffic lights on macOS (can be positioned freely and aligned horizontally or vertically)

On top of that a custom TranslucentBlurEffect is implemented. This works by taking screenshots and setting a blurred version of the image as the background of the Qt-Widget. For it to work properly the Qt-Window needs to be hidden before taking the screenshot. This is done everytime the Window gets activated. The drawbacks of this method are that the window disappears for a short amount of time when activated and that only static images are captured. So when a video is playing behind the Qt-Window a screenshot is taken once and shown as a blurred image until the window gets activated again.

As an example this project is an automated Clicker Application. It simulates mouse clicks at the current cursor location at the given interval. You can also register new Hotkeys to start and stop the clicking. The hotkeys are global system-wide hotkeys and work even if the Qt-Window is not focused.

Windows 10

Ubuntu 18.04

macOS

qt-framelessnativewindow's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.