Skip to main content

PyQt widget consists of svg icon label and text label side by side

Project description

pyqt-svg-icon-text-widget

PyQt widget consists of textless QLabel which has svg image as an icon on the left and text included QLabel on the right.

This module is useful to set the icon included title bar.

Requirements

  • PyQt5 >= 5.8

Setup

python -m pip install pyqt-svg-icon-text-widget

Included Package

Usage

  • setSvgFile(filename: str) to set svg file

  • setText(text: str) to set text

Note

Svg icon QLabel's maximum height is set according to text included QLabel's font height.

Example

Code Sample

from PyQt5.QtWidgets import QApplication

from pyqt_svg_icon_text_widget import SvgIconTextWidget





if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    ex = SvgIconTextWidget()

    ex.setSvgFile('ico/dark-notepad.svg')

    ex.setText('Dark Notepad')

    ex.show()

    sys.exit(app.exec_())

Result

image

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

pyqt-svg-icon-text-widget-0.0.31.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pyqt-svg-icon-text-widget-0.0.31.tar.gz.

File metadata

File hashes

Hashes for pyqt-svg-icon-text-widget-0.0.31.tar.gz
Algorithm Hash digest
SHA256 af82e076be25ea6b1519ce08ebcd78a8dd2b24f18281e5d3ce17975117248a90
MD5 6a5ecff8798d9023b7d9231ad47dc164
BLAKE2b-256 e1cba30e1bf6834b50f17d9cea7e34bf6f227d7d1aa75d0c7ced9ae357120781

See more details on using hashes here.

File details

Details for the file pyqt_svg_icon_text_widget-0.0.31-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqt_svg_icon_text_widget-0.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 e42e2f80bac7cf1eeaa0467b75152364897ec8269ef6e9da6c56cbf4cf6b8969
MD5 3aeaadd4c02a6d391d28dc45a90b2557
BLAKE2b-256 047e529f6cbb120b8b19da47ec2e19b1f67186979d01568f5d5930572b54cfd8

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