[Qt] I need a hack

Paul Ishenin webpirat at mail.ru
Tue Sep 23 07:18:04 CEST 2008


Den Jean wrote:
> -> it is not cross platform. There is none.
> I needed to read/set titlebar color on Linux, all I could find was : 
> read.write kde config file -> call dcop -Hhome -u user dcop kwin KWinInterface 
> reconfigure (usable for my controlled clients, not usable as a general 
> solution)
>
> Everything in mdi::desktoppalette can done directly qt/pascal. 
> In a procedure that is provided with a widget to initialize the palette from (no mdi):
>
> http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html
> X11 (V1.65) Temp Release for Mailing List
>
> -> demo windowflags.pas has some new code (temporarily)
>      just copy this file over to windows, compile and run it there -> tested on XP.
>      on linux it does what it reads (return selection color)
>   
Why not to use {$ifdef windows} in all qt-lcl code? Ofcource - we dont 
want a windows only solution - we want to write cross-platform code. In 
case of retrieving title bar colors we should not folow another rules. 
If qt code contains a way of retrieving this values - we must use it. 
Just imagine in next version qt guys will add a carbon/cocoa ifdefs to 
their code to get correct title bar values. What will we do? Add another 
ifdef to our code?

In case of using a method from qt library we guaranty that in future we 
dont need to review that code and correct it.

Best regards,
Paul Ishenin.



More information about the Qt mailing list