[Interest] Porting Qt4 to Qt5 with respect to styles

Duane duane.hebert at group-upc.com
Tue Nov 4 15:03:58 CET 2014


On 11/3/2014 6:08 PM, Nurmi J-P wrote:
>> On 03 Nov 2014, at 23:40, Allan Sandfeld Jensen <kde at carewolf.com> wrote:
>>
>> On Monday 03 November 2014, Duane wrote:
>>> We're looking at moving a few large projects from Qt 4 to 5.  One issue
>>> that I'm having is the absence of QWindowsStyle.  We have a class that's
>>> derived from QWindowsStyle. What's the simplest way to get around this.
>>>
>> QWindowsStyle still exists, it just a private class, so it requires widgets-
>> private to use. It would be better if you could derive from QCommonStyle
>> instead though.
>>
>
> Hi,
>
> Another option is to use QProxyStyle("windows") as a base class.
>

Not sure what you mean by "use QProxyStyle("windows") as a base class.

Do you mean to derive from QProxyStyle and use the initializer to set 
the base class to "windows" ?

I see that this is possible with Qt5 using a ctor that takes "key" but 
with Qt 4 QProxyStyle doesn't have a ctor that takes a "key".  Only a 
QStyle *.

But that should work.  Thanks.





More information about the Interest mailing list