Add QElidingLabel (#16)

* wip

* single class implementation

* fix init

* improve implementation

* improve sizeHint

* wrap

* update docs

* rename

* remove overloads

* review changes

* docs and reformat

* remove width from _elided text

* add tests
This commit is contained in:
Talley Lambert
2021-08-17 11:03:57 -04:00
committed by GitHub
parent 939c5222af
commit ba20665d57
4 changed files with 192 additions and 0 deletions

12
examples/eliding_label.py Normal file
View File

@@ -0,0 +1,12 @@
from superqt import QElidingLabel
from superqt.qtcompat.QtWidgets import QApplication
app = QApplication([])
widget = QElidingLabel(
"a skj skjfskfj sdlf sdfl sdlfk jsdf sdlkf jdsf dslfksdl sdlfk sdf sdl "
"fjsdlf kjsdlfk laskdfsal as lsdfjdsl kfjdslf asfd dslkjfldskf sdlkfj"
)
widget.setWordWrap(True)
widget.show()
app.exec_()