30.10.2017, 17:18, "iman ahmadvand" <iman72...@gmail.com>:
> Well.
> If it's OK to add new classes then we can create our classes And do the style 
> related things in private part until Qt6 release, on that time we can move 
> our changes to QStyle API.


Adding new and missing controls into QtWidgets, like QSwitch, is very welcome. 
I would prefer adding new widgets rather than changing the API of the existing 
ones (with ifdefs etc), unless you only need to _add_ some functions. If two 
widgets are conceptually different (e.g a QSwitch is not really a QCheckBox, or 
a "discrete slider" is not really a QSlider), they probably deserve to be 
separate widgets. But, those widgets need to conform to the current styling 
API. You cannot undermine that, and just hard-code the style in the private 
parts of the new widgets (even if QStyle wasn't really written with animations 
and transitions in mind). But, like already mentioned earlier in the thread, 
you can (and will have to) add new enums to QStyle that backs the new widgets, 
and provide a default style implementation for them (in e.g QCommonStyle) that 
will be picked up as last resort on all platforms.


If you think that your new widget set /style cannot conform to this, then it 
should probably be shipped outside Qt5.


-Richard

________________________________
Fra: Development <development-bounces+richard.gustavsen=qt...@qt-project.org> 
på vegne av Konstantin Tokarev <annu...@yandex.ru>
Sendt: 30. oktober 2017 15:21:22
Til: iman ahmadvand; Qt development mailing list
Emne: Re: [Development] Repository request: MaterialWidgets



30.10.2017, 17:18, "iman ahmadvand" <iman72...@gmail.com>:
> Well.
> If it's OK to add new classes then we can create our classes And do the style 
> related things in private part until Qt6 release, on that time we can move 
> our changes to QStyle API.
> And also in this way the application setting will go away.
> in result:
> 1.We have our new widgets
> 2.We have overcame qstyle api changes
>
> On Mon, Oct 30, 2017 at 5:03 PM, Oswald Buddenhagen 
> <oswald.buddenha...@qt.io> wrote:
>> On Mon, Oct 30, 2017 at 04:34:25PM +0330, iman ahmadvand wrote:
>>>    I was thinking of something like this to achieve:
>>>    QApplication::setStyle("material");
>>>
>>>    Which bring completely new styled and animated appearance.
>>>    That would be nice AND Qt way though.
>>>    But we've some new widgets beside the existing widgets, for
>>>    example: [...]
>>>
>>>    Which requires changes in QStyle enumerators.
>>>    The two build step was a good option but what about these new widgets ?
>>>    unfortunately it seems there is no way to porting this to Qt.
>>>
>> adding entirely new widgets (classes) can be done any time.
>
> But How? if it's not going to be a module ?

Just add new widgets to QtWidgets module.

>
>> the only challenge is that they may need new qstyle primitives, which
>> may then need custom implementations in the other styles as well. but i
>> guess "this widget doesn't look well unless you use the material style"
>> might be an acceptable policy.
>>
>> _______________________________________________
>> Development mailing list
>> Development@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
> ,
>
> _______________________________________________
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


--
Regards,
Konstantin
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to