PyQt explanation balloon
Project description
pyqt-explanation-balloon
PyQt explanation balloon
Requirements
- PyQt5 >= 5.8
Setup
python -m pip install pyqt-explanation-balloon
Included Packages
Preview
Explanation balloon can be used to explain certain widget. You can close this balloon with X button at the top right.
You can set the widget which you want to describe with balloon.
You can also set the size and content of balloon with constructor. Check the class overview below.
This explanation balloon is perfectly responsive to window's resize/move/activate/deactivate event.
Class Overview
ExplanationBalloon(widget, width: float, height: float, text: str)
- Constructor.widget
is the widget which is supposed to be explained by explanation balloon.
Example
from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication, QVBoxLayout, QWidget
from pyqt_explanation_balloon.explanationBalloon import ExplanationBalloon
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
btn = QPushButton('Show explanation balloon')
lay = QVBoxLayout()
lay.addWidget(btn)
mainWidget = QWidget()
mainWidget.setLayout(lay)
self.setCentralWidget(mainWidget)
self.__eb = ExplanationBalloon(btn, 200.0, 100.0, 'This is explanation balloon\nmade out of PyQt')
btn.clicked.connect(self.__eb.show)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
Result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyqt-explanation-balloon-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eba62be7130d7cfb4e97e010de7028ac72c3611d52cdaaa2796cbbcb22b79bc |
|
MD5 | 03164f2aca5e810dda139b5ef955ca96 |
|
BLAKE2b-256 | fca48a9256c18dc77193bc1e63dc09bda1e7e8873adec228ce1969831704abde |
Close
Hashes for pyqt_explanation_balloon-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c4b6b319c7457fabe56073cfe278edcb21c6dde58a845563e4f0eab1d5cd73 |
|
MD5 | 1c71351daa92b59266db8f2c4f06c88b |
|
BLAKE2b-256 | 7ef47ee14128e307469e0bcf462ab661a857a501c58290de5acbfed56a5bc520 |