Skip to content
  • 143k Topics
    719k Posts
    B
    @PLL3 said in Issue with QLabel and wordwrap: Out of curiosity I tried it, and it had the same result as adding a spacer item after my QLabel, ie it squishes it to the left and forces it to wrap as much as it can. Yes, as the example code I posted above, I met this problem exactly when I'm using alignment in layout :) @PLL3 said in Issue with QLabel and wordwrap: QRect boundingRect1 = fm.boundingRect(_label->rect(), _label->alignment(), _label->text()); Oh, flags is not the same as alignment, the way you call it still doesn't tell that you want text to wrap. So here it should be something like fm.boundingRect(_label->contentsRect(), _label->alignment() | Qt::TextWordWrap, _label->text()) contentsRect() is still not the exact rect value that Qt use to draw text. If you want to more accurate you can check the Qt source code of QLabel::paintEvent, but maybe not very necessary.
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    jeremy_kJ
    Are you looking for reloading of C++? That doesn't seem to be in the scope of Qt. The compiler would need to be involved. At a glance, an interpreter such as Cling would be unlikely to help unless everything reloadable was always run through it. C++ has no ABI, leaving each compiler to decide on interface semantics. Newly compiled/interpreted code would have to be adapted to the compiler, possibly including the specific version and compilation flags. For QML, there's a history of hot reload projects. For example, from a few seconds on pick-your-search-engine, https://qml.guide/live-reloading-hot-reloading-qml/. I used an early version of QML Live, and found it useful for tweaking simple UIs. When the structure is complicated, time savings becomes questionable, and the risk of traversing invalid states is high. For widgets from a .ui file, I haven't seen it, and guess that the typical level of C++ integration would make it highly unreliable. The same goes for QML reloading with anything beyond a trivial custom C++ integration.
  • Everything related to designing and design tools

    129 392
    129 Topics
    392 Posts
    J
    Using QT Designer might be the simpler route if the main goal is to keep the workflow smooth with Python. QT Design Studio projects often need manual adjustments before they run properly under PySide6.
  • Everything related to the QA Tools

    83 224
    83 Topics
    224 Posts
    B
    I have had a problem when editing the names.py manually in that Squish no longer recognises the object. I now delete the object and re-enter it after using the picker tool then add to object map. Not sure if this is what you meant, but hopefully this helps
  • Everything related to learning Qt.

    389 2k
    389 Topics
    2k Posts
    U
    @veerbhan I would recommend you to add with us (Me and Lehomar2vinci).
  • 2k Topics
    13k Posts
    Kent-DorfmanK
    @JonB @J.Hilk Yeah, my decreasing order of preference too is 3, 1, 2...I'm guilty of (1) quite freqently during freeform though to text coding. as far as constifying everything...I'm lazy, and it stifles creativity ;^)
  • 4k Topics
    18k Posts
    M
    Ho trovato xcode.app in /Applications ma xcode-select--switch/Applications/Xcode.app mi restituisce zsh: no such file or directory: xcode-select--switch/Applications/Xcode.app
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    N
    Please kindly change it to “ntninja”. The old name has SHA-256 hash “27f1e1e6277cc13bfc65294c7af80d2d6bbe23c42eb2ed426547fbe6311e55c4” (no newline in input) and shall not be named, thank you.