[Qt-interest] Derived custom widgets
Neville Dastur
qt at dastur.me.uk
Mon Aug 30 23:38:58 CEST 2010
> Op 30-8-2010 7:44, Andre Somers schreef:
>> An example for the approach above is to make a line edit with a clear
>> button inside the text area:
>> http://www.google.nl/search?q=qt+line+edit+clear+button
> Because it seems like the original code is hard to find, because the
> Qt repos moved, I have attached the copy I had locally for inspiration.
Thank you for the explanation in previous email and this code.
Got it all working for my use case, but a couple more issues.
1) I am using a fudge factor of 24 to account for the combobox drop down
arrow button. I can't find a pixel metric for it. Is there a better way
of getting the width
2) For some reason, if I click in the line edit part of the dateedit the
spin box controls are drawn and they fill the entire width between the
date text and line edit right hand side. BTW I have set
setCalanderPopup(true).
> Any pointers would be appreciated.
>
> 0x2361AB62
> 0xAE190048
> 0xC4193984
>
> I give no guarantees to what those pointers point to, or if they are
> properly aligned;-)
>
They all point to "42" ;-)
More information about the Qt-interest-old
mailing list