With QT5 anchored controls inside a GroupBox are placed wrongly when the GroupBox has no caption
Original Reporter info from Mantis: JuhaManninen @JuhaManninen
-
Reporter name: Juha Manninen
Original Reporter info from Mantis: JuhaManninen @JuhaManninen
- Reporter name: Juha Manninen
Description:
For example in the string property editor TStringsPropEditorFrm (unit StringsPropEditDlg) StatusLabel is anchored to its container GroupBox's bottom. The label's bottom edge should be 6 pix (border space) above the GroupBox bottom edge.
It is so with GTK2 and other widgetsets.
With QT5 it goes lower, mostly outside the GroupBox. It happens both in design time and in run time. I didn't test with QT4.
I added a temporary caption to TStringsPropEditorFrm's TextGroupBox in r63750.
I attach a demo project. In the main form you can replicate the error by removing caption from the GroupBox.
There is also a stripped version of TStringsPropEditorFrm. I reduced the cause of error with it.
This form can be opened with a button on the main form.
Manjaro has recent versions or QT libs. This is from ldconfig -p :
libQt5Core.so.5 (libc6,x86-64, OS ABI: Linux 3.17.0) => /usr/lib/libQt5Core.so.5
libQt5Core.so (libc6,x86-64, OS ABI: Linux 3.17.0) => /usr/lib/libQt5Core.so
How to get more precise versions?
Additional information:
There is also another problem with anchors. The anchor editor itself starts to behave wrong after using it for a while. The anchor side buttons cannot be switched, or a wrong button gets selected when you click. The problem goes away after restarting Lazarus. Something gets corrupt somewhere.
I don't remember seeing that with LCL-GTK2.
Mantis conversion info:
- Mantis ID: 37576
- OS: Linux 64-bit
- OS Build: Manjaro
- Platform: AMD Ryzen
- Version: 2.1 (SVN)
- Fixed in revision: 64857 (#7b8b329d)