Skip to main content

An multiwindowed application envirement made in PyQt

Project description

QTNOME ENVIREMENT

  • PROJECT LINK GITHUB

  • PROJECT LINK PYPI

  • A UI envirement to create and run applications made in PyQt5.

  • This gives a very simple but elegant look to the applications utilising QTNOME.

  • Get rid of boring and ugly Window Managers.

  • Special multi windowed applications need a dedicated envirement.

CURRENT ISSUES FOR DESKTOP UIs

  • We all are fond of ugly window managers and we hate them as we cant change them according to our needs.

  • Whenever we hear about window managers, the first thing that comes to our mind is that they can't change colors according to developer's needs.

  • Many a times we also need to create a UI in which the desktop of user is not required to be visible or we purposefully want it t be hidden so we use FullScreenWindows.

  • But here the problem comes, we can't have multiple FullScreenWindows on single screen without being ineffecient at switching multiple FullScreenWindows.

  • Also we can't have multiple NonFullScreenWindows along with FullScreenWindows without stacking them above or below FullScreenWindow and then doing Alt+Tab again and again.

  • So overall issues that we have are :

    • Ugly(most of them) and Heavy(some of them) Window Managers
    • Situation in which we dont need Desktop UI to be visible
    • Multiple Windows with desktop UI hidden
    • And finally the combination of above three points

COMPATIBILITY

  • QTNOME is purely written in PyQt5 which means it is compatible with all Qt python bindings like PyQt5, PyQt6, PySide and etc.

  • QTNOME works on Linux, OS-X, Windows (OS INDEPENDENT), the only condition is that the OS must have full Qt and python Qt binding support.

INSTALLATION

Install it using pip.

IMAGES AND VIDEOS

See video demonstration here

HOW IT WORKS ?

  • Generally what happens when we create an application is we create a new window for each instance. Here only one window is opened and that is a FullScreenWindow. FullScreenWindow has a smooth and blurred image as background. Ths background image can be repalced by another image file as per choice.

  • Windows that are instance of user defined UI classes can be opened. The UI classes need to be inherited from WINDOW class, except this thing large part of defining the class can go like defining a normal window class in Qt python bindings.

  • These windows do not open as windows they are actually inplemented using frames inside the FullScreenWindow, they are movable and resizable QWidgets inside the FullScreenWindow that are maintained by WINDOW_MANAGER defined in QTNOME.

  • The WINDOW_MANAGER is responsible for resizing the windows and closing them. Currently it has only these two features, will be upgraded as per need.

  • Transparency effects can easily applied to create sophisticated looking application.

  • Bottom-right corner of the window can be dragged to resize the window.

HOW TO USE ?

  • Firstly put a BACKGROUND.jpg in the work folder so that QTNOME can get the background image for application.

  • Then consider the following code.

from QTNOME import QTNOME
from PyQt5 import QtWidgets

import sys

class WIN(QTNOME.WINDOW) :
    def __init__(self, parent, xi, yi, width, height) :
        super().__init__(parent)
        self.setGeometry(xi, yi, width, height)

def on_exit() :
	print("[ # ] Exiting the application...")

if __name__ == "__main__" :
    from random import randint

    QTNOME.INIT_UI()
	QTNOME.INTERFACE_ENVIREMENT.add_on_exit(on_exit)

    for _ in range(10) :
        randcolors = [randint(0, 255), randint(0, 255), randint(0, 255)]
        WI = QTNOME.CREATE_WINDOW([WIN, {"xi": randint(0, QtWidgets.QDesktopWidget().screenGeometry(-1).width() - 500),
                                  "yi": randint(0, QtWidgets.QDesktopWidget().screenGeometry(-1).height() - 300),
                                  "width": randint(0, 400), "height": randint(0, 250)}],
                                  name = str(_),
                                  window_bar_color="rgb({0}, {1}, {2})".format(*randcolors),
                                  window_border_color="solid rgb({0}, {1}, {2})".format(*randcolors),
                                  text_color="rgba(255, 255, 255, 1)",
                                  window_border_width=1,
                                  text_style="Z003")

    QTNOME.INTERFACE_ENVIREMENT.show()
    sys.exit(QTNOME.APP.exec())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

QTNOME_P-Y-R-O-B-O-T-1.0.4.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

QTNOME_P_Y_R_O_B_O_T-1.0.4-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file QTNOME_P-Y-R-O-B-O-T-1.0.4.tar.gz.

File metadata

  • Download URL: QTNOME_P-Y-R-O-B-O-T-1.0.4.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for QTNOME_P-Y-R-O-B-O-T-1.0.4.tar.gz
Algorithm Hash digest
SHA256 73cd2b22ac6d5d68730b8d5574c8b8aa9ca16d1378c83f9b9eeeda72c1cfe367
MD5 36cce52177422555dd385cc3c8733b78
BLAKE2b-256 6b48bfb63f26eef4a79f426f26f7bb55b275af5295855b27583b9eeae8f75932

See more details on using hashes here.

File details

Details for the file QTNOME_P_Y_R_O_B_O_T-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for QTNOME_P_Y_R_O_B_O_T-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9464e84003e60c5c3754b7aeb1461f36bafffb50b2d892ae8d4fe7a6eab4232e
MD5 d89fda0bbde8c579de56f281c36bc6f2
BLAKE2b-256 055e7963714a172f572fd813b8fa385bc508ddd03dcb84ad168506d2c533d893

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page