Saravanan666/pypi-org huggingface dataset:
Package: pyqt-media-slider
pyqt-media-sliderThis is QSlider which supports the smoothly draggable handle, direct handle placement to click position for media(audio, video).RequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-media-sliderIncluded Packagespyqt-resource-helperSignalpressed(int)Signal emit when presses the handledragged(int)Signal emit when drags the handlereleased(int)Signal emit when releases the handleExamplefromPyQt5.QtWidgetsimportQWidget,QHBoxLayout,QApplicationfrompyqt_media_slider.mediaSliderimportMediaSliderclassMediaSliderExample(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):self.__slider=MediaSlider()lay=QHBoxLayout()lay.addWidget(self.__slider)self.setLayout(lay)if__name__=="__main__":importsysapp=QApplication(sys.argv)player=MediaSliderExample()player.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/151730656-42ecb8e1-3987-415c-bc5f-8ae1d10bf2e6.mp4
Package: pyqt-modern-slider
pyqt-modern-sliderPyQt modern styled sliderRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-modern-sliderExamplefromPyQt5.QtWidgetsimportQApplication,QVBoxLayout,QPushButton,QWidgetfrompyqt_modern_sliderimportModernSliderif__name__=="__main__":importsysapp=QApplication(sys.argv)example=ModernSlider()btn=QPushButton('Play')lay=QVBoxLayout()lay.addWidget(example)lay.addWidget(btn)mainWidget=QWidget()mainWidget.setLayout(lay)mainWidget.show()app.exec_()PreviewSee Alsopyqt-media-slider- QSlider which is good to use in media playerpyqt-label-slider- QSlider which is connected with QLabel
Package: pyqt-moving-label
pyqt-moving-labelPyQt label which is moving from left to rightRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-moving-labelDetailed DescriptionThis inherits the QLabel.Good to use as an advertisement or notice tool.You can create constructor like this -MovingLabel('Moving Label', parent_class). Both two arguments are necessary.Moving duration is set to 3000 milliseconds by default.Method OverviewsetDurationBasedOnWindowSize(f: bool)- Set the duration based on window size. If you set this toTrue, The window gets bigger the moving speed gets faster. The window gets smaller the moving speed gets slower.setDuration(milliseconds: int)- Set the duration of label moving from left to right.ExampleCode SamplefromPyQt5.QtWidgetsimportQMainWindow,QApplication,QVBoxLayout,QTextEdit,QWidgetfrompyqt_moving_label.movingLabelimportMovingLabelclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):self.__label=MovingLabel('Moving Label',self)# if you want to set the dynamic moving speed based on window size# self.__label.setDurationBasedOnWindowSize(True)# if you want to set the duration# self.__label.setDuration(5000)lay=QVBoxLayout()lay.addWidget(self.__label)lay.addWidget(QTextEdit())mainWidget=QWidget()mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)if__name__=="__main__":importsysapp=QApplication(sys.argv)w=MainWindow()w.show()sys.exit(app.exec_())Resulthttps://user-images.githubusercontent.com/55078043/170969527-91c80a06-b6eb-4aaf-a305-421479bd7139.mp4
Package: pyqt-music-player-widget
pyqt-music-player-widgetPyQt music player widgetRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-music-player-widgetIncluded Packagesmutagenpyqt-media-sliderpyqt-svg-buttonThis is usingmutagento get the full length of the media.This only works for mp3 extension.Method/Signal OverviewMethods -play(),pause(),stop()Signals -played(bool),positionUpdated(int),durationUpdated(int)ExamplefromPyQt5.QtWidgetsimportQWidget,QVBoxLayout,QApplication,QFormLayoutfrompyqt_find_path_widgetimportFindPathWidget# https://github.com/yjg30737/pyqt-find-path-widget.gitfrompyqt_music_player_widgetimportMusicPlayerWidgetclassMusicPlayerExample(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):self.__findPathWidget=FindPathWidget()self.__findPathWidget.setExtOfFiles('Audio Files (*.mp3)')self.__findPathWidget.added.connect(self.__added)lay=QFormLayout()lay.addRow('Audio File',self.__findPathWidget)lay.setContentsMargins(0,0,0,0)pathFindWidget=QWidget()pathFindWidget.setLayout(lay)self.__musicPlayerWidget=MusicPlayerWidget()lay=QVBoxLayout()lay.addWidget(pathFindWidget)lay.addWidget(self.__musicPlayerWidget)self.setLayout(lay)def__added(self,filename:str):self.__musicPlayerWidget.setMedia(filename)if__name__=="__main__":importsysapp=QApplication(sys.argv)player=MusicPlayerExample()player.show()sys.exit(app.exec_())Result
Package: pyqt-new-window-handler
pyqt-new-window-handlerPyQt QObject type class which operates/handles "New Window" featureNoteCurrently, this package is forced to be usedpyqt-custom-titlebar-setter.RequirementsPyQt5 >= 5.15Setuppython -m pip install pyqt-new-window-handlerIncluded Packagespyqt-custom-titlebar-setterpyqt-custom-titlebar-windowExampleLook at the source ofdarkNotepadApp.pyof pyqt-dark-notepad packagecalculatorApp.pyof pyqt-dark-calculator package
Package: pyqt-notifier
pyqt-notifierPyQt Windows notifier show at bottom right of the desktop screenRequirementsPyQt5 >= 5.8Included packagepyqt-svg-button- For svg icon close buttonSetuppython -m pip install pyqt-notifierUsage# Informative text is large text at upper part of the notifier window and detailed text is small text at lower part.notifierWidget=NotifierWidget(informative_text:str,detailed_text:str)# You can add some widgets at the bottom of the notifier. Note: This needs more tests.notifierWidget.addWidgets(widgets:list)If you press the escape button or click the exit button on the top right of the notifier window, notifier window will be closed.ExamplefromPyQt5.QtWidgetsimportQApplicationfrompyqt_notifierimportNotifierWidgetif__name__=="__main__":importsysapp=QApplication(sys.argv)notifierWidget=NotifierWidget()notifierWidget.show()app.exec_()Result
Package: pyqt-polygon-window
pyqt-polygon-windowPyQt polygon windowRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-polygon-windowIncluded packagespyqt-resource-helperFeaturesetBorderWidth(width: int)setCornerLength(corner_length: int)ExampleCode SamplefromPyQt5.QtWidgetsimportQApplicationfrompyqt_polygon_windowimportPolygonWindowif__name__=="__main__":importsysapp=QApplication(sys.argv)pw=PolygonWindow()pw.show()app.exec_()Result
Package: pyqt-popup-graphics-view
pyqt-popup-graphics-viewPyQt Popup QGraphicsView (Image will pop up when move the mouse cursor inside the QGraphicsView, follow the cursor if you move it inside of the window)RequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-popup-graphics-viewExampleCode ExamplefromPyQt5.QtWidgetsimportQApplicationfrompyqt_popup_graphics_view.popupGraphicsViewimportPopupGraphicsViewif__name__=="__main__":importsysapp=QApplication(sys.argv)popupGraphicsView=PopupGraphicsView()popupGraphicsView.setFileName('nico_bellic.png')popupGraphicsView.show()app.exec_()ResultNote: Mouse cursor should've been top left of the image. Windows capture feature doesn't include the mouse cursor in the screenshot.
Package: pyqt-reactivity
pyqt-reactivityDescriptionpyqt-reactivity is a project that aims to provide basic reactivity module for
PyQt widgets.InstallationInstall the latest version from PyPI:pip install -U pyqt-reactivityUsageTo use basic reactivity module, see the following example:frompyqt_reactivityimportRef,computed,ref# Create a reactive reference.a=ref(1)a.watch(lambdav:print("a updated:",v))# Define a computed function that depends on the reactive reference.defa_squared(a:Ref[float])->float:returna.value**2# Create a computed reference.b=computed(a_squared,args=(a,))b.watch(lambdav:print("b updated:",v))# Update the reactive reference.a.value=2See more implementations onexamplesfolder.LicenseMIT
Package: pyqt-resource-helper
pyqt-resource-helperSetting icons, stylesheets of imported packages based on main module's path to prevent FileNotFoundErrorRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-resource-helperUsage# set the iconPyQtResourceHelper.setIcon([closeBtn],['ico/close.png'])# set the stylePyQtResourceHelper.setStyleSheet([closeBtn],['style/button.css'])
Package: pyqt-responsive-label
pyqt-responsive-labelPyQt QLabel which can resize the font responsively accordance with window's size changeRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-responsive-labelMethod OverviewsetAcceptTextChange(f: bool)- Choose the option that this should accept text change(paintEvent) or not.ExamplefromPyQt5.QtWidgetsimportQApplication,QVBoxLayout,QWidgetfrompyqt_responsive_labelimportResponsiveLabelclassWidget(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):responsiveLabel=ResponsiveLabel(self)responsiveLabel.setText('ABC')lay=QVBoxLayout()lay.addWidget(responsiveLabel)self.setMinimumSize(responsiveLabel.sizeHint())self.setLayout(lay)if__name__=="__main__":importsysapp=QApplication(sys.argv)widget=Widget()widget.show()app.exec_()ResultLike below, label font size is changing accordance with window's size.Note: Since v0.0.3, text is smaller than result image above for avoiding excessive width problem.See Alsopyqt-timer-label- Application which is using the package.
Package: pyqtribbon
PyQtRibbonRibbon Bar for PyQt or PySide applications.GitHub Repository:github.com/haiiliin/pyqtribbon.Documentation:pyqtribbon.haiiliin.com/en/stable.Python Package Index:pypi.org/project/pyqtribbon.Read the Docs:readthedocs.org/projects/pyqribbon.InstallationPyQtRibbon is distributed toPyPI, you can use pip to install it:pipinstallpyqtribbonYou can also install the package from source:pipinstallgit+https://github.com/haiiliin/pyqtribbon.git@mainCompatible Python and PyQt/PySide VersionsPythonPyQt5PyQt6PySide2PySide63.7:white_check_mark::white_check_mark::white_check_mark::white_check_mark:3.8:white_check_mark::white_check_mark::white_check_mark::white_check_mark:3.9:white_check_mark::white_check_mark::white_check_mark::white_check_mark:3.10:white_check_mark::white_check_mark::white_check_mark::white_check_mark:3.11:white_check_mark::white_check_mark::x: [^1]:white_check_mark:[^1]: PySide2 does not support Python 3.11 yet.The Ribbon BarThe ribbon is first introduced by Microsoft in the 2000's. It is a toolbar with a tabbed interface. According toMicrosoft:A ribbon is a user interface (UI) element that organizes commands into logical groups. These groups appear on separate tabs in a strip across the top of the window. The ribbon replaces the menu bar and toolbars. A ribbon can significantly improve application usability. For more information, see Ribbons. The following illustration shows a ribbon. A ribbon can significantly improve application usability. For more information, seeRibbons. The following illustration shows a ribbon.Definitions of Ribbon ElementsApplication button: The button that appears in the upper-left corner of a ribbon. The Application button replaces the File menu and is visible even when the ribbon is minimized. When the button is clicked, a menu that has a list of commands is displayed.Quick Access toolbar: A small, customizable toolbar that displays frequently used commands.Category: The logical grouping that represents the contents of a ribbon tab.Category Default button: The button that appears on the ribbon when the ribbon is minimized. When the button is clicked, the category reappears as a menu.Panel: An area of the ribbon bar that displays a group of related controls. Every ribbon category contains one or more ribbon panels.Ribbon elements: Controls in the panels, for example, buttons and combo boxes. To see the various controls that can be hosted on a ribbon, see RibbonGadgets Sample: Ribbon Gadgets Application.Screenshots
Package: pyqt-rounded-corners-lineedit
pyqt-rounded-corners-lineeditPyQt QLineEdit with rounded cornersRequirementsPyQt5 >= 5.8Installpython -m pip install pyqt-rounded-corners-lineeditIncluded Packagesabsresgetter- To get absolute path of resource fileDetailed DescriptionRounded corners, borderless line edit.If you want to add the border, add code like below.lineEdit.setStyleSheet(lineEdit.styleSheet() + 'QLineEdit { border: 1px solid black; }')ExampleCode SamplefromPyQt5.QtWidgetsimportQApplication,QGridLayout,QWidgetfrompyqt_rounded_corners_lineeditimportRoundedCornersLineEditclassWidget(QWidget):def__init__(self):super().__init__()self.__initUi()def__initUi(self):lineEdit=RoundedCornersLineEdit()# if you want to set the border# lineEdit.setStyleSheet(lineEdit.styleSheet() + 'QLineEdit { border: 1px solid black; }')lay=QGridLayout()lay.addWidget(lineEdit)self.setLayout(lay)if__name__=="__main__":importsysapp=QApplication(sys.argv)widget=Widget()widget.show()app.exec_()Result
Package: pyqt-rounded-profile-image
pyqt-rounded-profile-imagePyQt rounded profile image like Youtube, Google, etc.RequirementsPyQt5How to dogit clone ~python sample.pyPreviewYou can select the image file to show (*.png, *.jpg, *.bmp)There are two images (both two are Laurie Holden) in the root directory for testing the feature.TODO listDefault image or textPopup windowAnimation
Package: pyqtschema
pyqtschemapyqtschemaallows the generation of a graphical representation of ajsonschema. A given
schema is translated to QWidgets.InstallationAs usual:install the pypi versionpip install pyqtschemaor clone the repositorypip install git+https://github.com/amsico/pyqtschema.gitUsageUse theWidgetBuilderin applications or run the module to visualize a schema:python -m pyqtschema ./path/to/your/scheam.jsonExamplesSeveral examples are available in theexamplesfolder. The
examples usepydanticto generate schemas easily.Backgroundpyqtschemais inspired byqt-jsonschema-form. Due to the author's
lack oftimeand the missinganyOf-support, this project was started.ChangelogVersion 0.2.0 (2023-05-05)useQtPyinstead ofPyQt5Version 0.1.9 (2022-07-12)FIX: default calculation for simple AllOf-casesNew example for ui_schema usageNew example for simple AllOf caseVersion 0.1.8 (2022-07-04)state-setter in EnumWidget supports Enum-objectsFIX: is_valid_data function in Schema returned wrong resultsFIX: AnyOf-Widget was not working properly with several types of the same type (issue #13)add first testing for EnumWidgetrenamed some examplesVersion 0.1.7 (2022-02-11)improve the readme-fileadd simple load/save functionality to the applicationadd changelog to project-descriptionadd workaround for pydantic-allOf schemaVersion 0.1.6 (2022-02-10)improve anyOf support:setting a state may modify the combo-box (if entry was changed)improve default-supportVersion 0.1.5 (2022-02-09)improve path/directory-supportVersion 0.1.4 (2022-02-04)improve visibility of widgets (relevant widgets scale)addparentparameter to create_widget in builderpass parent to QWidgets to avoid flickering during the initializationVersion 0.1.3 (2022-02-03)supportui:hiddenin ui_schema (hide an unwanted widget; default is False)supportui:disabledin ui_schema (disable an unwanted widget; default is False)support parent parameter in create_form-function (Issue #6)Version 0.1.2 (2022-02-02)first official release on pypi:https://pypi.org/project/pyqtschema/
Package: pyqt-search-bar
pyqt-search-barPyQt search barRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-search-barIncluded Packagespyqt-resource-helperpyqt-svg-buttonFeatureProvidingsearched(text: str)signal to activate user-defined method after search.Set place holder directly withsetPlaceHolder(text: str).Available to execute the search with either pressing enter or pressing the search button.Toggled search button based on whether searchLineEdit(type is QLineEdit) is empty or not.Being able to get searchLineEdit and searchButton, closeButton to let user customize on their own.Being able to set the label of the search bar withsetLabel(visibility: bool, text: str).Being able to close the search bar withsetCloseBtn(visibility: bool).Set search/close button's icon withsetSearchIcon(icon_filename: str),setCloseIcon(icon_filename: str). Note: Icon should be SVG file.Get search bar, search line edit, search/close button withgetSearchBar,getSearchButton,getCloseButtonto change style or feature.ExampleBasicCode ExamplefromPyQt5.QtWidgetsimportQApplicationfrompyqt_search_barimportSearchBarif__name__=="__main__":importsysapp=QApplication(sys.argv)searchBar=SearchBar()searchBar.setPlaceHolder('Input the text...')searchBar.show()app.exec_()ResultEmpty search bar (search button is disabled)Search bar which is not empty (search button is enabled)See Alsopyqt-instant-search-bar- instant search bar gui
Package: pyqt-search-bar-menu
pyqt-search-bar-menuPyQt QMenu which contains auto search bar as first itemRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-search-bar-menuIncluded Packagespyqt-instant-search-bar- Search bar at the topFeatureSearch bar is at the very top of the menu, let user searchQAction's text. At this time menu list works like a completer.ExamplesSimple Code SamplesearchBarMenu=SearchBarMenu('Menu',self)searchBarMenu.addAction('Action')Executable Code SamplefromPyQt5.QtWidgetsimportQMainWindow,QApplicationfrompyqt_search_bar_menuimportSearchBarMenuclassMainWindow(QMainWindow):def__init__(self):super().__init__()self.__initUi()def__initUi(self):menubar=self.menuBar()filemenu=menubar.addMenu('File')searchBarMenu=SearchBarMenu('A Bunch of Actions',self)foriinrange(5):action=searchBarMenu.addAction(f'Action{i+1}')filemenu.addMenu(searchBarMenu)menubar.addMenu(filemenu)self.setMenuBar(menubar)if__name__=="__main__":importsysapp=QApplication(sys.argv)ex=MainWindow()ex.show()app.exec_()Result
Package: pyqt-single-image-graphics-view
pyqt-single-image-graphics-viewPyQt one image only QGraphicsViewRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-single-image-graphics-viewMethod OverviewsetFilename(filename: str)setPixmap(p: QPixmap)setAspectRatioMode(mode)See Alsopyqt-fitting-graphics-view
Package: pyqt-slideshow
pyqt-slideshowPyQt widget for slide showRequirementsPyQt5 >= 5.8Setuppython -m pip install pyqt-slideshowDetailed DescriptionThis widget mainly consists of three child widget.ViewNavigation button widget - buttons on the both sides of the viewBottom button widget - buttons at the bottomYou can set the image files to show withsetFilenames.You can watch previous/next image by clicking the navigation button or nth image file by clicking the buttons at the bottom.Image is automatically changed by internal timer(QTimer). Interval is set to 5000 milliseconds by default.Method OverviewsetFilenames(filenames: list)- give the image files. You have to call this one time only so far.setTimerEnabled(f: bool)- set the image change timersetInterval(milliseconds: int)- set the image change intervalsetNavigationButtonVisible(f: bool)- set the navigation button's visibility(which also decides that you use it or not)setBottomButtonVisible(f: bool)- set the bottom button's visibility(which also decides that you use it or not)setGradientEnabled(f: bool)- Cover the dark gradient over the imageFor examplegetButtonGroup()- get the button group(QButtonGroup) which has the every button. You can get them bybtnGrp.buttons()getBtnWidget()- get the btn widget to set the spacing between the bottom button or other customization of button widgetgetPrevBtn()- get the prev buttongetNextBtn()- get the next buttonExampleCode Sample 1 (Including navigation/bottom button)fromPyQt5.QtWidgetsimportQApplicationfrompyqt_slideshowimportSlideShowif__name__=="__main__":importsysapp=QApplication(sys.argv)s=SlideShow()s.setFilenames(['bioshock.jpg','dragon_age.jpg','ride_to_hell_retribution.jpg'])s.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/170615616-932fb93d-3311-4f97-8ad7-10943e0d2308.mp4Code Sample 2 (Not including navigation/bottom button)fromPyQt5.QtWidgetsimportQApplicationfrompyqt_slideshowimportSlideShowif__name__=="__main__":importsysapp=QApplication(sys.argv)s=SlideShow()s.setFilenames(['bioshock.jpg','dragon_age.jpg','ride_to_hell_retribution.jpg'])s.setNavigationButtonVisible(False)# to not show the navigation buttons.setBottomButtonVisible(False)# to not show the bottom buttons.show()app.exec_()Resulthttps://user-images.githubusercontent.com/55078043/170641896-336308b5-6f5c-4099-8b03-029a1f81337e.mp4TODO listGive the option to go back to first page by user when pressing the next button in the last pageTransition effectDefault screen when there is no image (thumbnail?)Add more styles with QML
Package: pyqtspecgram
pyqtspecgramPython spectogram plotted using pyqtgraphPyqtplot allows significantly faster navigation and zooming for larger scale waterfalls compared to pyplots specgram method.See more onhttps://github.com/epeters13/pyqtspecgramAuthor: Edwin G.W. PetersRequirementsscipypyqtgraphInstallationpip install pyqtspecgramorpython setup.py installUsageCheck "test_pyqtspecgram" for an examplePlot a waterfallfrom pyqtspecgram import pyqtspecgram
import numpy as np

Fs = 1e6
t = 5  # sec
N = int(t * Fs)
sigma_noise_2 = 0.1
NFFT = 4096

a = np.exp(1j * 2 * np.pi * 150e3 / Fs * np.arange(N))
a += np.exp(-1j * 2 * np.pi * 298e3 / Fs * np.arange(N))
a += np.sqrt(sigma_noise_2) / 2 * (np.random.randn(N) + 1j * np.random.randn(N))

Sxx, f_a, t_a, fig = pyqtspecgram(a, NFFT, Fs, Fc=0)TodoPrevent garbage collection when returning from main thread to allow figure to remain open in the background in an interactive ipython consoleExport coordinates in graph to console with double or right clickAllow dynamic time-averaged spectrogramming for very large data sets
Package: pyqtspinner
QtWaitingSpinnerQtWaitingSpinner is a highly configurable, custom Qt widget for showing "waiting" or
"loading" spinner icons in Qt applications, e.g. the spinners below are all
QtWaitingSpinner widgets differing only in their configuration:The widget is pretty customizable:Installationpip install pyqtspinnerConfigurationThe following properties can all be controlled directly through their corresponding
setters:Color of the widget"Roundness" of the linesSpeed (rotations per second)Number of lines to be drawnLine lengthLine widthRadius of the spinner's "dead space" or inner circleThe percentage fade of the "trail"The minimum opacity of the "trail"UsageYou can easily adjust spinner settings by running:pyqtspinner-confMake the spinner you would like and press "show init args" button. It will generate the
code snippet which is almost ready-to-use:WaitingSpinner(parent,roundness=100.0,opacity=3.141592653589793,fade=80.0,radius=10,lines=20,line_length=10,line_width=2,speed=1.5707963267948966,color=(0,0,0))As an alternative example, the code below will create a spinner that (1) blocks all user
input to the main application for as long as the spinner is active, (2) automatically
centers itself on its parent widget every time "start" is called and (3) makes use of
the default shape, size and color settings.spinner=QtWaitingSpinner(self,True,True,Qt.ApplicationModal)spinner.start()# starts spinningEnjoy!Thanks:to@z3ntufor the groundwork. to@snowwlexfor the widget itself.