Qt desktop components with user Style



  • Maybe someone faced with a similar problem and could help me. I want to use "qt desktop components" but styles of some elements i want change from system to custom but save all the functionality. How to do it, for example, to scroll area element



  • The thing with desktop components is that it uses the current users desktop theme. So if you change your desktop theme the components will have that theme.

    However, that might not be possible for you to do.. (making desktop themes isn't easy). The fastest way for you to customize a certain desktop component is probably by just looking at the QML file of the component you want to change, make a copy of it with some custom name and start editing the QML to your liking.



  • Thanks for the reply, sadly that there is no more convenient way.



  • It is now possible to style certian components. All you have to do is import QtQuick.Controls.Styles 1.0



  • Yes it is certainly possible to style a scroll area using Qt 5.1 RC.
    This was done using custom styling: http://blog.qt.digia.com/wp-content/uploads/2013/06/Screen-Shot-2013-06-21-at-2.51.45-PM3.png
    As steno suggests, just set a custom ScrollViewStyle (or TableViewStyle) on the control and modify it to your liking.

    Not everything has a custom style in the first release however, but we are planning on adding more public style classes soon.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.