Recent

Author Topic: lazarus equivalent of qt5 formlayout  (Read 366 times)

muller59

  • New Member
  • *
  • Posts: 16
lazarus equivalent of qt5 formlayout
« on: August 07, 2020, 12:07:38 pm »
is there a lazarus equivalent of the qt5 formlayout widget?
This widget simplifies the setup and layout of an input trmendously by providing test, input edit and alignment of both.
the closest i have come is TLabeledEdit, but that is one line only aand does not setup alignment with other TLabelEdits automatically
--
Regards,
Rob.
----------
lubuntu 20.04, Lazarus trunk, FPC 3.0.4
Raspbian Buster, Lazarus trunk, FPC 3.0.4

Handoko

  • Hero Member
  • *****
  • Posts: 3902
  • My goal: build my own game engine using Lazarus
Re: lazarus equivalent of qt5 formlayout
« Reply #1 on: August 07, 2020, 01:08:53 pm »
Hello muller59,
Welcome to the forum.

I don't know much about QT form layout, so I searched the web for it. I found an interesting video:
https://www.youtube.com/watch?v=gWa2rqe8l6E

That was impressive.

Did you meant something like that. If yes, then you will be disappointed. Lazarus does not have such feature. Luckily similar behavior can be achieve using combination of:

- Align
- Anchors
- BorderSpacing
- Constraint
- TPanel
- TSplitter

I admit it isn't as easy as QT form layout, but it is not too hard either. Lazarus/FPC is very powerful, you can do a lot things if you have the knowledge.

If you're new in Lazarus/Pascal, here are some worth to read pages:

https://wiki.freepascal.org/Portal:New_Users
https://wiki.freepascal.org/New_IDE_features_since
https://wiki.freepascal.org/Lazarus_Documentation
https://wiki.freepascal.org/Category:Tutorials
https://wiki.freepascal.org/Lazarus_Faq
« Last Edit: August 07, 2020, 01:23:45 pm by Handoko »

PascalDragon

  • Hero Member
  • *****
  • Posts: 2405
  • Compiler Developer
Re: lazarus equivalent of qt5 formlayout
« Reply #2 on: August 07, 2020, 01:37:03 pm »
The Autosize/Layout capabilities of Lazarus provide enough to implement this. Maybe one should add an example for such a generic layout...

muller59

  • New Member
  • *
  • Posts: 16
Re: lazarus equivalent of qt5 formlayout
« Reply #3 on: August 07, 2020, 02:42:44 pm »
Handoko, PascalDragon,

thanks for the replies. i see i have much reading to do, but i will get there.
making the switch from qt5 with python to lazarus has been an uphill battle so far.
--
Regards,
Rob.
----------
lubuntu 20.04, Lazarus trunk, FPC 3.0.4
Raspbian Buster, Lazarus trunk, FPC 3.0.4

 

TinyPortal © 2005-2018