[Gambas-user] Objects out of place, jumping left on resize with QT (probably my code)

Bruce Steers bsteers4 at gmail.com
Mon Mar 1 19:58:51 CET 2021


I have this custom CheckBox working almost perfectly now.
the hardest part was to get the look/behaviour to be the same on gtk2+3 and
qt and to to emulate standard CheckBox layout.
I just had to re-write it a bit because I used .Centered making it not work
on older gambas versions.

It's got one problem though and one difference in the normal checkbox
layout.

the difference is in look in qt (it's only slight)
with gtk2 and 3 if you set AutoResize and Expand on a CheckBox it just
expands.
On qt it expands the height but not the width (run the test app with
different GB_GUI to see what i mean)

that's merely cosmetic though and not really an issue.

the problem is that if i run with qt and have the text to the right the box
is a little too far right.
if i resize the window the boxes jump left to where they should be and then
stay there.

I can't seem to stop it happening :(

Here is a link to the TextBox control source..
http://bws.org.uk/TickBox.zip

Please feel free to laugh at the code if it needs it (just let me know
what's funny) ;)
Any help appreciated
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210301/9fea7f1a/attachment.htm>


More information about the User mailing list