James Brock

Results 280 comments of James Brock

`word_wrap=True` size calculations seem to work okay if you don't set the `"width"` of `Label` directly, and instead set the `"width"` of its containing layout widget. (PySide6 v6.6.0)

“If you want the QLabel to fit the text then you must use adjustSize()” https://stackoverflow.com/questions/48665788/qlabels-getting-clipped-off-at-the-end/48665900#48665900

https://doc.qt.io/qtforpython-6/overviews/layout.html#layout-issues “The use of rich text in a label widget can introduce some problems to the layout of its parent widget. Problems occur due to the way rich text is...

Good discussion https://stackoverflow.com/questions/64165018/word-wrapped-qlabel-cutting-off-text-early/64171542#64171542

https://stackoverflow.com/questions/14238138/heightforwidth-label > I've put C++ code at http://egret.psychol.cam.ac.uk/code/2017_01_16_qt_height_for_width/ for the following layouts: > > - `BoxLayoutHfw`, `VBoxLayoutHfw`, `HBoxLayoutHfw` -- replacements for `QBoxLayout` etc. > - `GridLayoutHfw` -- replacements for `QGridLayout`....

https://stackoverflow.com/questions/74311198/qt-window-resize-height-to-fit-qlabel-text

Also maybe a mouse click event.

https://doc.qt.io/qtforpython-6/PySide6/QtAsyncio/index.html

Introducing QtAsyncio in Technical Preview https://www.qt.io/blog/introducing-qtasyncio-in-technical-preview

“the primary purpose for using Context is to avoid prop-drilling” for read-only global state like theme or language. https://blog.isquaredsoftware.com/2021/01/context-redux-differences/