[Qt] I need a hack

zeljko zeljko at holobit.net
Sun Sep 21 17:32:10 CEST 2008


On Sunday 21 September 2008 16:01, Paul Ishenin wrote:
> Hello, Items specific to the Qt widget set
>
> I want to teach qt-lcl return true titlebar color values. I looked at qt
> sources and found few places where they are requested from windows. I am
> talking about this colors:
> - COLOR_ACTIVECAPTION,
> - COLOR_INACTIVECAPTION,
> - COLOR_CAPTIONTEXT,
> - COLOR_INACTIVECAPTIONTEXT,
> - COLOR_GRADIENTACTIVECAPTION,
> - COLOR_GRADIENTINACTIVECAPTION
>
> The best palce I see to get them is to call:
> QMdiSubWindowPrivate::desktopPalette();

QMdiSubWindow/private is not a place to ask such things.
Let's study a bit qt docs, besides I'm trolltech customer so I can ask such 
questions w/o problems. (I'll be out of here next few days ...so I can send 
an email to trolltech ... about thursday/friday )
Something comes on my mind is to ask QStyleOptionTitleBarH somehow about it,
I mean ask QStyleOption_palette(handle : QStyleOptionH; retval : QPaletteH );

eg.
so := QStyleOptionTitleBar_create();
QStyleOption_palette(so, MyPalette);
QStyleOptionTitleBar_destroy(so);

don't know now exact solution, but I think that making such hack isn't good 
idea. And what if your app is not MDI ? Crash ?
What about Linux/Mac ?

zeljko



More information about the Qt mailing list