Saravanan666/pypi-org huggingface dataset:
Package: pyqt-bounding-box
pyqt-bounding-boxPyQt bounding box for graphic design softwareRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-bounding-boxFeatureCursor shape changes properly for position (horizontal/vertical edge, etc.)Being able to resize the box horizontally/vertically/diagonallyBeing able to move the box with either mouse cursor or arrow keysBeing able to change the attribute of the boxMethods OverviewsetLineWidth(self, n: int) - Default width is 3setColor(self, color: QColor) - Default color is blacksetStyle(self, style: Qt.PenStyle) - Default style is Qt.DashLine (You can see more about this style inhere)setWidth(width: int)setHeight(height: int)setSize(width: int, height: int)You can use the standard function likesetPen(pen: QPen)if you know how to use it, Here's the example:item=BoundingBox()pen=QPen()pen.setStyle(Qt.DashLine)pen.setWidth(3)pen.setColor(QColor(0,0,0))item.setPen(pen)ExampleCode SamplefromPyQt5.QtWidgetsimportQWidget,QGraphicsView,QVBoxLayout,QApplication,QGraphicsScenefrompyqt_bounding_box.boundingBoximportBoundingBoxclassExample(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):view=QGraphicsView()self.__scene=QGraphicsScene()self.__scene.setSceneRect(0,0,400,400)item=BoundingBox()# item.setLineWidth(8) If you want to change the edge line width, add the code.# item.setColor(QColor(255, 255, 255)) If you want to change the color of the line to white, add the code.# item.setStyle(Qt.SolidLine) If you want to change the style of line from dashed to solid line, add the code.self.__scene.addItem(item)view.setScene(self.__scene)lay=QVBoxLayout()lay.addWidget(view)self.setLayout(lay)if__name__=="__main__":importsysapp=QApplication(sys.argv)example=Example()example.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/148708740-cd1f0765-7768-44b6-88bb-770e2d34fe12.mp4See Alsopyqt-hbounding-boxpyqt-vbounding-box
Package: pyqtchat8741
Demo-Chat: PyQT / Socket / Hash-Based MACA project that implements chat using sockets. Hash-Based Message Authentication Code is used for user authorization.(RU) Проект реализующий чат с использованием сокетов. При авторизации пользователя используется "Hash-Based Message Authentication Code".Quick start# 📀 install python-packagepoetryaddpyqtchat8741# 📀 or (if you don't using poetry)pipinstallpyqtchat8741# 💾 create folder for db storemkdirdb# 🚀 for execute CLI interface. After input "s" for start or "x" for exitpyqtchat8741_start# or# 🚀 you can start sepparetly sever and clientspyqtchat8741_server# run serverpyqtchat8741_client# run client
Package: pyqt-checkbox-file-list-widget
pyqt-checkbox-file-list-widgetPyQt QListWidget for files and supporting the checkbox.The main classCheckBoxFileListWidgetinherits from bothFileListWidget(pyqt-file-list-widget) andCheckBoxListWidget(pyqt-checkbox-list-widget).RequirementsPyQt5 >= 5.8Included Packagespyqt-file-list-widget- Parent classpyqt-checkbox-list-widget- Parent classFeaturegetCheckedFilenames() -> listSetuppython -m pip install pyqt-checkbox-file-list-widgetCode ExampleimportosfromPyQt5.QtCoreimportQtfromPyQt5.QtWidgetsimportQMainWindow,QCheckBox,QHBoxLayout,\QVBoxLayout,QWidget,QApplication,QPushButtonfrompyqt_checkbox_file_list_widgetimportCheckBoxFileListWidgetclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):allChkBox=QCheckBox('Check all')showFilesNameOnlyChkBox=QCheckBox('Show files name only')self.__listWidget=CheckBoxFileListWidget()self.__listWidget.setFilenames([os.path.join(os.getcwd(),filename)forfilenameinos.listdir(os.getcwd())])allChkBox.stateChanged.connect(self.__listWidget.toggleState)showFilesNameOnlyChkBox.stateChanged.connect(self.__listWidget.setFilenameOnly)lay=QHBoxLayout()lay.setAlignment(Qt.AlignLeft)lay.addWidget(allChkBox)lay.addWidget(showFilesNameOnlyChkBox)lay.setContentsMargins(0,0,0,0)topLeftWidget=QWidget()topLeftWidget.setLayout(lay)self.__deleteBtn=QPushButton('Delete')self.__deleteBtn.clicked.connect(self.__delete)lay=QHBoxLayout()lay.setAlignment(Qt.AlignRight)lay.addWidget(self.__deleteBtn)lay.setContentsMargins(0,0,0,0)topRightWidget=QWidget()topRightWidget.setLayout(lay)lay=QHBoxLayout()lay.addWidget(topLeftWidget)lay.addWidget(topRightWidget)lay.setContentsMargins(0,0,0,0)topWidget=QWidget()topWidget.setLayout(lay)lay=QVBoxLayout()lay.addWidget(topWidget)lay.addWidget(self.__listWidget)mainWidget=QWidget()mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)def__delete(self):self.__listWidget.removeCheckedRows()if__name__=="__main__":importsysapp=QApplication(sys.argv)htmlViewer=MainWindow()htmlViewer.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/145915698-c0e2550c-cdc9-4aaf-8e96-a729a8d8050f.mp4
Package: pyqt-checkbox-list-widget
pyqt-checkbox-list-widgetPyQt QListWidget for checkable itemsRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-checkbox-list-widgetIncluded Packagespyqt-tooltip-list-widget- parent classExamplefromPyQt5.QtWidgetsimportQCheckBox,QVBoxLayout,QWidget,QApplicationfrompyqt_checkbox_list_widget.checkBoxListWidgetimportCheckBoxListWidgetclassWidget(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):allCheckBox=QCheckBox('Check all')checkBoxListWidget=CheckBoxListWidget()checkBoxListWidget.addItems(['a','b','c','d'])allCheckBox.stateChanged.connect(checkBoxListWidget.toggleState)lay=QVBoxLayout()lay.addWidget(allCheckBox)lay.addWidget(checkBoxListWidget)self.setLayout(lay)if__name__=="__main__":importsysapp=QApplication(sys.argv)widget=Widget()widget.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/145694178-9d583318-2533-43fd-bbc1-71c85444a953.mp4Similar packagepyqt-checkbox-table-widget
Package: pyqt-checkbox-table-widget
pyqt-checkbox-table-widgetPyQt's QTableWidget which has checkbox as first header itemRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-checkbox-table-widgetMethod OverviewMany methods is changed/overriden because of the fact that check box being used in first column.setHorizontalHeaderLabels(labels: typing.Iterable[str])- Sets horizontal header label except for first column (for check box)clearContents(start_r_idx=0)- Remove all contents including check box from start_r_idxsetDefaultValueOfCheckBox(flag: bool)- Self-explanatory.stretchEveryColumnExceptForCheckBox()- Apply self.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) except for first column, which is for check box.setRowCount(rows: int)toggleState(state)- Toggle every single checkbox. State should be Qt.CheckState. You can see how to use this feature in Code Example 2 below.getCheckedRows()- Return the list of indexes of row which are checked.getUncheckedRows()setCheckedAt(idx: int, f: bool)- If f is True, the check box at idx is checked. f is False, the check box at idx is unchecked.removeCheckedRows()removeUncheckedRows()ExampleCode Example 1fromPyQt5.QtWidgetsimportQApplication,QTableWidgetItemfrompyqt_checkbox_table_widget.checkBoxTableWidgetimportCheckBoxTableWidgetif__name__=="__main__":importsysapp=QApplication(sys.argv)widget=CheckBoxTableWidget()widget.setRowCount(3)widget.setItem(0,1,QTableWidgetItem('abc'))# Remember column argument should be at least 1 (if it is zero, item will cover the checkbox cell)widget.show()app.exec_()ResultCode Example 2fromPyQt5.QtCoreimportQtfromPyQt5.QtWidgetsimportQApplication,QTableWidgetItem,QMainWindow,QCheckBox,QVBoxLayout,QWidgetfrompyqt_checkbox_table_widget.checkBoxTableWidgetimportCheckBoxTableWidgetclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):allChkBox=QCheckBox('Check all')tableWidget=CheckBoxTableWidget()tableWidget.setRowCount(10)tableWidget.stretchEveryColumnExceptForCheckBox()# stretch every section of tablewidget except for check box sectionforiinrange(tableWidget.rowCount()):item=QTableWidgetItem()item.setTextAlignment(Qt.AlignCenter)# alignitem.setText(str(i)*50)# text sampletableWidget.setItem(i,1,item)allChkBox.stateChanged.connect(tableWidget.toggleState)# if allChkBox is checked, tablewidget checkboxes will also be checkedlay=QVBoxLayout()lay.addWidget(allChkBox)lay.addWidget(tableWidget)mainWidget=QWidget()mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)if__name__=="__main__":importsysapp=QApplication(sys.argv)window=MainWindow()window.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/144937804-958af370-5069-4fe9-870d-ace9838eb483.mp4Similar packagepyqt-checkbox-list-widget
Package: pyqtclass
PyQtClassesPyQt 기반으로 동작하는 'Worker 객체' 들의 베이스클래스 제공.WorkerSchedule 테이블 정보를 기반으로 MainApp, SubApp, Worker 의 동작시간을 제어할 수 있음.WorkerSchedule 테이블 예시스키마 설명worker: Worker Class Name (string)
stime: Start Time (string)
etime: End Time (string)
interval: Interval Time (seconds)
env: Python Environment (string)
batch: 배치 실행 여부 (boolean)
desc: 상세설명 (string)
Package: pyqtcmd
See the full documentation athttps://pyqtcmd.readthedocs.io/en/latest/Changelog:1.0.5Drop explicit dependency on PyQt5PyQt6 compatibility1.0.4Fix labels for undo/redo UICommand mixinsFix label for CompositeCommand1.0.3Add apast()accessor to HistoryAdd alabelargument to CompositeCommand constructor1.0.2Make associated buttons visible (or not) when the action
visibility changes1.0.1Added atipargument to UICommand, which sets both the tooltip
and the status tip
Package: pyqt-color-button
pyqt-color-buttonCircle-shaped color buttonRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-color-buttonClass and Method OverviewConstructor -ColorButton(size=20, r=255, g=255, b=255)You can make a new instance of ColorButton like below.btn = ColorButton(size=40, r=0, g=0, b=0)Size argument is value(px) of border-radius, color is value of background-color.WithsetColor(rgb: tuple)orsetColor(rgb: QColor), you can set the color after you made a new instance.getColor()let you get the current color of the box.There iscolorChanged(QColor)signal to detect the color of box changed.Preview
Package: pyqt-color-picker
pyqt-color-pickerPyQt color picker dialog which contains color picker widget.You can either use dialog or widget.RequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-color-pickerClass, Method OverviewColorPickerDialogColorPickerDialog(color=QColor(255, 255, 255), orientation='horizontal')colorargument's type can beQColororstr.orientationargument decides the overall layout direction of the dialog. There are two values.'horizontal','vertical'. See layout preview below.getColor() -> QColor- get the color.If you only want to use this as a part of window(not as whole dialog), useColorPickerWidget(color=QColor(255, 255, 255), orientation='horizontal'). See the example below.ColorPickerWidgetcolorChanged(color: QColor)- signal. After color being changed, this will be emitted.getCurrentColor() -> QColor- get the current color.Layout typeHorizontalVerticalUsageDialogCode Sampledialog=ColorPickerDialog()reply=dialog.exec()ifreply==QDialog.Accepted:color=dialog.getColor()# return type is QColor//..Resulthttps://user-images.githubusercontent.com/55078043/144693507-7b078c86-8c71-4df5-869f-8380885b9108.mp4Using as a part of windowCode SamplefromPyQt5.QtWidgetsimportQMainWindow,QApplication,QHBoxLayout,QWidget,QTextEditfrompyqt_color_pickerimportColorPickerWidgetclassWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):self.__te=QTextEdit()self.__colorPicker=ColorPickerWidget(orientation='vertical')self.__colorPicker.colorChanged.connect(self.colorChanged)# when color has changed, call the colorChanged functionlay=QHBoxLayout()lay.addWidget(self.__te)lay.addWidget(self.__colorPicker)mainWidget=QWidget()mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)defcolorChanged(self,color):self.__te.setStyleSheet(f'QTextEdit{{color:{color.name()}}}')if__name__=="__main__":importsysapp=QApplication(sys.argv)ex=Window()ex.show()sys.exit(app.exec_())Resulthttps://user-images.githubusercontent.com/55078043/189460590-18bc80b5-fb48-43f7-891f-dd6cf48243ee.mp4
Package: pyqtCuWi
pyqtCuWiCustom WidgetsIcon ButtonRank WidgetPop UpExample CodeExample CodeExample CodeQFBoxLayoutLoading ScreenOuter RadiusExample CodeExample CodeExample CodeTag AreaQHtmlEditorQSyntaxHighlightExample CodeExample CodeQSyntaxHighlightLicenseGPL v3.0© Mücahit Yusuf Yasin GündüzShare This Repository
Package: pyqt-dark-gray-theme
pyqt-dark-gray-themePyQt dark-gray themeNoteThis is deprecated except for my personal project. If you want to use the dark-gray style, useqtsasstheme.RequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-dark-gray-themeIncluded Packagesqtsasstheme- For get dark-gray theme css codeUsagegetThemeStyle() -> str- use it toQMainWindow,QDialog.getIconButtonStyle() -> str- use it toQPushButton/QToolButtonwhich has an icon. This is for button which contains icon only.getIconTextButtonStyle() -> str- use it toQPushButton/QToolButtonwhich has no icon. This is for button which contains text only or icon and text.getMenuBarStyle(menu_bar: QMenuBar) -> struse it toQMenuBar. This is for dealing with menu bar. You have to give the menu bar you want to change its style.getMainWidgetStyle() -> struse it to top levelQWidget. This is for dealing with the case ofQWidgetas a main window.ExampleCode SampleExample GUI app -pyqt-comic-viewer(which isQMainWindowas a parent class)fromPyQt5.QtWidgetsimportQApplication,QPushButtonfrompyqt_comic_viewer.comicBookViewerimportComicBookViewerfrompyqt_dark_gray_theme.darkGrayThemeimportgetThemeStyle,getIconButtonStyle,getIconTextButtonStyle,\getMenuBarStyleif__name__=="__main__":importsysapp=QApplication(sys.argv)ex=ComicBookViewer()ex.setStyleSheet(getThemeStyle())# whole themebtns=ex.findChildren(QPushButton)# buttonsforbtninbtns:# check if text existsifbtn.text().strip()=='':btn.setStyleSheet(getIconButtonStyle())# no text - icon button styleelse:btn.setStyleSheet(getIconTextButtonStyle())# text - icon-text button stylemenu_bar=ex.menuBar()# menu barmenu_bar_style=getMenuBarStyle(menu_bar)menu_bar.setStyleSheet(menu_bar_style)ex.show()app.exec_()Result
Package: pyqtdarktheme
PyQtDarkThemePyQtDarkTheme applies a flat dark theme to QtWidgets application. There's a light theme too. Color balanced from the dark theme for easy viewing in daylight.Check out thecomplete documentation.Project statusTestsFeaturesA flat dark and light themeSupport PySide and PyQtSync with OS's theme and accent (Mac, Windows, Linux)Resolve the style differences between Qt versionsProvide dark/light theme QPaletteOverride Qt old standard iconsThemesDark ThemeLight ThemeRequirementsPython 3.7+Qt 5.15+PySide6, PyQt6, PyQt5 or PySide2Installation MethodLast released versionpip install pyqtdarkthemeLatest development versionpip install git+https://github.com/5yutan5/PyQtDarkTheme.git@mainUsageimportsysfromPySide6.QtWidgetsimportQApplication,QMainWindow,QPushButtonimportqdarkthemeapp=QApplication(sys.argv)# Apply the complete dark theme to your Qt App.qdarktheme.setup_theme()main_win=QMainWindow()push_button=QPushButton("PyQtDarkTheme!!")main_win.setCentralWidget(push_button)main_win.show()app.exec()Further information can be found in our docs:Usage GuideEnable HiDPI# enable_hi_dpi() must be called before the instantiation of QApplication.qdarktheme.enable_hi_dpi()app=QApplication(sys.argv)qdarktheme.setup_theme()For Qt6 bindings, HiDPI “just works” without using this function.Light themeqdarktheme.setup_theme("light")Sync with OS's theme and accentqdarktheme.setup_theme("auto")On macOS, qdarktheme also syncs with accent colors.Customizing colorsYou can customize the theme color.# Customize accent color.qdarktheme.setup_theme(custom_colors={"primary":"#D0BCFF"})For a list of all customizable colors, see the Theme Color Reference:Theme ColorSharp frameYou can change the corner style.# Default is "rounded".stylesheet=qdarktheme.setup_theme(corner_shape="sharp")QPalette and stylesheetYou can also only load QPalette and stylesheet.qdarktheme.setup_themeuses the following functions internally.palette=qdarktheme.load_palette(theme="dark")stylesheet=qdarktheme.load_stylesheet(theme="dark")ExampleTo check all Qt widgets, run:python -m qdarktheme.widget_galleryLicenseThe svg files for the PyQtDarkTheme are derivedMaterial design icons(Apache License Version 2.0). Qt stylesheets are originally fork ofQDarkStyleSheet(MIT License). Other files are covered by PyQtDarkTheme's MIT license. The accent detector(qdarktheme/_os_appearance/_accent/_mac_detect) is inspired bydarkdetect(3-clause BSD License).ContributingAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this:Contributing GuideChange logSeeReleases.
Package: pyqt-date-table-widget
pyqt-date-table-widgetPyQt table widget for showing dateRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-date-table-widgetFeatureAvailable to set date range to show (100 as default)Available to set start date (current date as default)Show different color for weekendExampleCode ExamplefromPyQt5.QtCoreimportQDatefromPyQt5.QtWidgetsimportQApplicationfrompyqt_date_table_widgetimportDateTableWidgetif__name__=="__main__":importsysapp=QApplication(sys.argv)afterFifteenDaysFromToday=QDate.currentDate().addDays(15)dateTableWidget=DateTableWidget(start_date=afterFifteenDaysFromToday,date_range=1000)dateTableWidget.setColumnCount(2)dateTableWidget.setHorizontalHeaderLabels(['Literature','Mathematics'])dateTableWidget.show()app.exec_()Result
Package: pyqt-description-tooltip
pyqt-description-tooltipPyQt QToolTip that user can add description and so on.Setuppython -m pip install pyqt-description-tooltipUsageYou can get the qt tooltip text using static method below.DescriptionToolTipGetter.getToolTip(title:str='',shortcut:str='',description:str='',shortcut_color:str='#AAA',description_color:str='#AAA')ExampleCode SamplefromPyQt5.QtWidgetsimportQMainWindow,QPushButton,QApplicationfrompyqt_description_tooltipimportDescriptionToolTipGetterfrompyqt_style_setterimportStyleSetterclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):btn=QPushButton('ToolTip Button')btn.setToolTip(DescriptionToolTipGetter.getToolTip(title='ToolTip Title',shortcut='Ctrl+T',description='ToolTip Description.',))self.setCentralWidget(btn)if__name__=="__main__":importsysapp=QApplication(sys.argv)example=MainWindow()StyleSetter.setWindowStyle(example)# https://github.com/yjg30737/pyqt-style-setter.gitexample.show()app.exec_()Result
Package: pyqt-drawer
pyqt-drawerPyQt drawer.You can set the widget to drawer.Opening, closing drawer involved animations of size change and drawer/parent window's opacity.RequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-drawerIncluded Packagespyqt-svg-buttonFeatureDrawer(parent, widget: QWidget, orientation)Constructor.parentis parent window.widgetis the widget you want to set in the drawer.orientationis orientation of drawer. Available values are Qt.Horizontal, Qt.Vertical.Being able to set size/opacity duration withdrawer.setDuration(msc)Being able to set end size value withdrawer.setEndValue(size).ExampleCode ExamplefromPyQt5.QtWidgetsimportQMainWindow,QListWidget,QApplication,QWidget,QGridLayoutfrompyqt_drawer.drawerimportDrawerfrompyqt_timer.settingsDialogimportSettingsDialogclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):listWidget=QListWidget()listWidget.addItems(['Age of Empires II: Definitive Edition','American Truck Simulator','Arma 3',"Assassin's Creed"])drawer=Drawer(self,listWidget)# widget to show/hidedrawer.setDuration(200)# set duration (200 milliseconds)drawer.setEndValue(listWidget.sizeHint().width())# set end value with listWidget's appropriate maximum widthlay=QGridLayout()lay.addWidget(SettingsDialog(),0,0,1,1)lay.addWidget(drawer,0,0,1,1)lay.setContentsMargins(0,0,0,0)mainWidget=QWidget()mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)if__name__=="__main__":importsysapp=QApplication(sys.argv)mainWindow=MainWindow()mainWindow.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/169175912-bce19b71-2246-46aa-9435-5b108ae72c62.mp4
Package: pyqt-dreamstudio
pyqt-dreamstudioUsing DreamStudio API in Python desktop applicationYou can make a bunch of image without installing heavy resources like CUDA, torch, etc. But it's not free.This is separated frompyqt-openaipackage to people who only wants to use stable diffusion apiand who wants to fork this to make their app.PrerequisiteYou have to get the DreamStudio api key fromhere.Using DreamStudio or the API requires credits. Take a look atpricingabout this.Make your image inherebefore doing with this app.How to InstallBy Cloniniggit clone ~cd pyqt-dreamstudiopip install -r requirements.txtpython setup.py installcd pyqt_dreamstudiopython main.pyBy pippip install pyqt_dreamstudiofromPyQt5.QtWidgetsimportQApplication# can use PySide6 as wellfrompyqt_dreamstudio.mainimportImageGeneratingToolWidgetif__name__=="__main__":importsysapp=QApplication(sys.argv)window=ImageGeneratingToolWidget()window.show()sys.exit(app.exec_())How to UseThere is the options tab at the right side of the window.Input your API key, choose parameters you want to set, write propmt, submit it, and you can see the result at the left side (which looks like file explorer) soon enough.See thewhole explanationabout every options to make better image.After images got generated, you can copy or download any images when you put the mouse cursor over them.ResultNoteAs far as i know, Using Stable Diffusion with API doesn't support disable safety filter. Shame!!So if you type any words which is considered as NSFW, toast containing error message will show upLicenseMIT