On Wednesday 26 July 2006 15:45, Graeme Geldenhuys wrote:
> Hi,
>
> Anybody using Qt widget set.  Can you confirm the button order in
> dialogs (referring to Help, OK and Cancel buttons).

yes, but qt3 with kylix :)

>
> As far as I can tell this is what I have...
>
> Win32:    Help, OK, Cancel
> Gnome, GTK1, GTK2:   Help, Cancel, OK
> Qt:   Help, OK, Cancel
>
> Currently the TButtonPanel only looks for {$IFDEF Unix} and {$ELSE}
> which I guess means MSWindows.  This wouldn't work for the Qt widget
> set?
>
> Qt 4.2 now has a QDialogButtonBox which does the same, but they
> mention Desktop Environments instead of OS Environments, due the Gnome
> and KDE both being able to run on a *unix OS, but their button orders
> differ.

then you should hack into QtBindings or TButtonPannel, here is my idea :)
{$IFDEF QTWIDGETSET}
{$IFDEF UNIX}

 if Pos('gnome', AnsiLowerCase(GetEnvironmentVariable('WINDOWMANAGER'))) > 0
 then
gnomeQtBehaviour
else
kdeQtBehaviour;
{$IFDEF ELSE}
normalQtBehaviour;
{$ENDIF}
{$ENDIF}

you should check this environment variable (does it exist, differences on 
various distros, or gnome sets up WINDOWMANAGER env var...don't know, haven't 
gnome installed), maybe you can use KDE_FULL_SESSION or something else.

> Anybody got an idea how we can change the TButtonPanel to check the
> Desktop Environment (widget set) instead of the OS?
>
> Regards,
>   Graeme.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to