Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2022-03

How to check in code if LCLWidgetType is qt5?

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

My app checks in code if trayIcon.Hint is working.

Therefor I have to distinguish in my code if the application has

LCLWidgetType=qt5 or LCLWidgetType=gtk2

The solution for gtk2 is:

getEnvironmentVariable('LAZUSEAPPIND')

I couldn't google a check for LCLWidgetType=qt5, how to do that?

Tipps are welcome ....

Reply by email

Mattias Gaertner
to John Landmesser
Show quoted text 11 lines
My app checks in code if trayIcon.Hint is working. Therefor I have to distinguish in my code if the application has LCLWidgetType=qt5 or LCLWidgetType=gtk2 The solution for gtk2 is: > getEnvironmentVariable('LAZUSEAPPIND') I couldn't google a check for LCLWidgetType=qt5, how to do that?

Do you mean
{$IF defined(lclqt5) or defined(lclgtk2)}
?

Mattias

Reply by email

John Landmesser
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
On Tue, 29 Mar 2022 15:44:24 +0200 John Landmesser via lazarus wrote: > My app checks in code if trayIcon.Hint is working. > > Therefor I have to distinguish in my code if the application has > > LCLWidgetType=qt5 or LCLWidgetType=gtk2 > > The solution for gtk2 is: > >> getEnvironmentVariable('LAZUSEAPPIND') > I couldn't google a check for LCLWidgetType=qt5, how to do that? Do you mean {$IF defined(lclqt5) or defined(lclgtk2)} ? Mattias

I try

{$IF defined(lclqt5)

Thank you!

Reply by email

John Landmesser
to Mattias Gaertner: On Tue, 29 Mar 2022 15:44:24 +0200 Do you mean {$IF defined(lclqt5) or defined(lclgtk2)} ?
Mattias Gaertner wrote 18 lines
On Tue, 29 Mar 2022 15:44:24 +0200 John Landmesser via lazarus wrote: > My app checks in code if trayIcon.Hint is working. > > Therefor I have to distinguish in my code if the application has > > LCLWidgetType=qt5 or LCLWidgetType=gtk2 > > The solution for gtk2 is: > >> getEnvironmentVariable('LAZUSEAPPIND') > I couldn't google a check for LCLWidgetType=qt5, how to do that? Do you mean {$IF defined(lclqt5) or defined(lclgtk2)} ? Mattias

My first answer got lost?

I'll take

{$IF defined(lclgtk2)}

Thanks, that worked!

Reply by email