Skip to main content

sc_mainwindow is a pyqt5 custom widget.

Project description

sc_mainwindow is a pyqt5 custom widget. This widget provides a custom frame. You can move the window using the title bar and can resize the window by using the frame. It does not depend upon os. Also, you can customize anything.

Author

SihinaCode Youtube channel. click here to visit

Installation

Use the package manager pip to install sc_mainwindow.

pip install sc-mainwindow

Usage

main window

from PyQt5 import QtWidgets
from sc_mainwindow import MainWindow
import sys

class Main(MainWindow):
    def __init__(self):
        super(Main, self).__init__()
       
if __name__ == "__main__":
        app = QtWidgets.QApplication(sys.argv)
        Form = Main()
        Form.show()
        sys.exit(app.exec_())
from PyQt5 import QtWidgets
from sc_mainwindow import MainWindow
#from body import Body               #import your pyqt5 Body class here
import sys

class Main(MainWindow):
    def __init__(self):
        super(Main, self).__init__()
        #window size
        #self.resize(800, 600)   

        #enable/disable the ability to resize the window - default: 1
        #self.resizable = 0     

        #title text - default:untitled          
        #self.setTitleText("title text")  

        #title bar icon
        #self.setIcon("path of image")    

        #transparency of window (0 - 1) - default: 1
        #self.setTransparent(0.9)         

        #enable/disable frame shadow - default: 1
        #self.setFrameShadow(0)           

        #body = Body()
        #self.insertBody(body)

        #self.setTitleBarColor(0, 0, 0)
        #self.setShadowColor(0, 0, 0)
        #self.setBorderColor(0, 0, 0)

        #self.titleBar.hide()
        #self.minimizeButton.hide()
        #self.maximizeButton.hide()
        #self.closeButton.hide()



if __name__ == "__main__":
        app = QtWidgets.QApplication(sys.argv)
        Form = Main()
        Form.show()
        sys.exit(app.exec_())

body

from PyQt5 import QtWidgets, QtCore, QtGui
from bodyUi import Ui_Form                 #your UI class

class Body(QtWidgets.QWidget, Ui_Form):
    def __init__(self):
        super(Body, self).__init__()
        self.setupUi(self)

Support

Visit the SihinaCode YouTube channel for support. click here

License

MIT

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

sc_mainwindow-1.2.tar.gz (236.8 kB view details)

Uploaded Source

File details

Details for the file sc_mainwindow-1.2.tar.gz.

File metadata

  • Download URL: sc_mainwindow-1.2.tar.gz
  • Upload date:
  • Size: 236.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for sc_mainwindow-1.2.tar.gz
Algorithm Hash digest
SHA256 b092d6ebe32ac93e76e76ad2c55704fb50d74c535e07ead4278905c6ca3c1fc6
MD5 b7cdb0e0c2fba9cce30ee38f8fda25ea
BLAKE2b-256 9fb0d9eb2ddb169f996768b6f6961faa253c8f57d96c14934b1b358481c66db6

See more details on using hashes here.

Supported by

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