[Lazarus] LCLWidgetType:=qt5 not to configure in source code ?
John Landmesser
jmlandmesser at gmx.de
Wed Sep 18 15:43:59 CEST 2024
Am 18.09.24 um 15:22 schrieb Mattias Gaertner via lazarus:
>
>
> On 9/18/24 15:03, John Landmesser via lazarus wrote:
>> I can set LCLWidgetType:=qt5 in an extra build mode. But i was asking
>> myself why not use something like this:
>>
>>> unit Config;
>>>
>>> interface
>>>
>>> {$IFDEF linux}
>>> const
>>> WidgetType = 'qt5';
>>> {$ELSE}
>>> const
>>> WidgetType = 'gtk2';
>>> {$ENDIF}
>>>
>>> implementation
>>>
>>> end.
>>
>> include this unit in uses clause of mainform ... has no effect !
>>
>> Ok, but why ?
>
> The LCLWidgetType is an IDE macro. The package lcl has some
> conditionals to add unit paths and for some widgettypes linker options.
> If you want to compile a lcl app without Lazarus/lazbuild and without
> passing command line options, then you could add unit paths to the
> source. You loose comfort - you have been warned.
>
>
> Mattias
>
Thanks, i keep using build modes ... better for a noob like me :-)
More information about the lazarus
mailing list