Recent

Author Topic: Lazarus and Widget sets  (Read 5502 times)

raelb

  • New member
  • *
  • Posts: 9
Lazarus and Widget sets
« on: July 26, 2015, 07:51:05 pm »
Hi,

1. When you create a new graphical application in Lazarus (said to use the LCL library for the GUI), what widget set is this using i.e. GTK or QT? (Lazarus 1.4)

2. Is it possible to use more than 1 widget set in an application?

3. If the widget set is QT, is it possible to use a QT widget that does not have a LCL wrapper, e.g. their rich edit control?

Thanks
Rael


Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Lazarus and Widget sets
« Reply #1 on: July 26, 2015, 08:17:09 pm »
1) If your Lazarus is compiled with GTk then default widgetset for your project will be GTk. And the same with Qt. You can change widgetset of your project in Project Options -> node Additions and Overrides

2) No, you can't use two widgetsets at a time.

3) No. Maybe some hack, like creating the widget in library in C++ code and link it.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

raelb

  • New member
  • *
  • Posts: 9
Re: Lazarus and Widget sets
« Reply #2 on: July 26, 2015, 08:35:15 pm »
Thanks

1) How do I tell what widgetset Lazarus was compiled with?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Lazarus and Widget sets
« Reply #3 on: July 26, 2015, 08:47:38 pm »
Changing widgetset of Lazarus: Tools -> Configure "Build Lazarus" ... -> choose from combobox

Changing widgetset of your project: Project -> Project Options ... -> Additios and Overrides, click Set "LCLWidgetType"

Note that GTk Lazarus can create Qt apps and Qt Lazarus can create GTk apps.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

raelb

  • New member
  • *
  • Posts: 9
Re: Lazarus and Widget sets
« Reply #4 on: July 26, 2015, 08:49:01 pm »
I see. Thanks for the info.

Is there a list of which LCL components are supported by each widgetset? Do all widgetsets support the same components?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Lazarus and Widget sets
« Reply #5 on: July 26, 2015, 09:25:32 pm »
Here is roadmap on Lazarus wiki: http://wiki.lazarus.freepascal.org/Roadmap
Maybe it's not up to date so the real state is better.

And another page from wiki: http://wiki.lazarus.freepascal.org/Accessing_the_Interfaces_directly
It is related to your original question from the first post.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8833
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus and Widget sets
« Reply #6 on: July 27, 2015, 01:37:52 am »
 :-*
3) No. Maybe some hack, like creating the widget in library in C++ code and link it.
I think this one is possible, not really a hack, just a wrapper required. i.e. extend libqt4pas with the required widget. The main problem is just C++ linking, flattening to C would make it possible to be used even just for specific widgetset. If I'm not mistaken, fpCEF3 employs this technique for its display surface.

 

TinyPortal © 2005-2018