qrainbowstyle 0.9.6

Last updated:

0 purchases

qrainbowstyle 0.9.6 Image
qrainbowstyle 0.9.6 Images
Add to Cart

Description:

qrainbowstyle 0.9.6

QRainbowStyle is a fully customizable stylesheet for Python and Qt applications.
This module provides a function to load pre-compiled stylesheets. To generate your own
style based on custom color palette clone package from project homepage.
qrainbowstyle.windows module adds frameless windows and message boxes.
From version v0.8 module supports native Windows calls.
Features:


Borders snapping
Minimize, restore, close animations
Size grips on borders
Frame shadow
Aero shake



On Linux and Darwin qrainbowstyle will load class with its own implementation of these features.
Due to a bug in Qt, window minimizing is not supported on MacOS.
First, start importing our module
import qrainbowstyle
Then you can get stylesheet provided by QRainbowStyle for various Qt wrappers
as shown below
# PySide2
stylesheet = qrainbowstyle.load_stylesheet_pyside2(style='oceanic')
# PyQt5
stylesheet = qrainbowstyle.load_stylesheet_pyqt5(style='oceanic')
Alternatively, from environment variables provided by QtPy, Qt.Py
# QtPy
stylesheet = qrainbowstyle.load_stylesheet(style='oceanic')
# Qt.Py
stylesheet = qrainbowstyle.load_stylesheet(style='oceanic', qt_api=Qt.__binding__)
Finally, set your QApplication with it
app.setStyleSheet(stylesheet)
To load frameless window in your app import both qrainbowstyle and qrainbowstyle.windows modules
import qrainbowstyle
import qrainbowstyle.windows
Initialize qt app and load choosen stylesheet.
Next, create instances of frameless window and your master widget with content you want to show.
# Create app and load selected stylesheet
app = QtWidgets.QApplication(sys.argv)
app.setStyleSheet(qrainbowstyle.load_stylesheet(style="oceanic"))

# Package options
# qrainbowstyle.alignButtonsLeft() # align titlebar buttons to left side
# qrainbowstyle.useDarwinButtons() # use darwin style buttons
qrainbowstyle.setAppName("My new application") # set global name for application
# qrainbowstyle.setAppIcon("icon.ico") # set global app icon

# Create frameless mainwindow
win = qrainbowstyle.windows.FramelessWindow()

# Create content widget and pass reference to main window
widget = MasterWidget(win)

# Add widget to main window and show it
win.addContentWidget(widget)
win.show()

sys.exit(app.exec())
Enjoy!

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.