Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51785

Need a "HOWTO create/include/build/maintain your qt56controls style"

    XMLWordPrintable

Details

    Description

      This bug is a follow-up of [Interest] [Qt Labs Controls 5.6] Customization recommendations.

      I'm porting a QML 5.5 app to the new Qt 5.6 Labs Controls. As part of this effort, I'm creating my own style based on Material (could have been Universal or Default).

      So far, I found some help:

      • The documentation states that "all visual implementations sit in the imports folder, so that users who want to create their own complete style can copy the folder and start tweaking".
      • Gabriel's QtWS15's talk showcases an example of such tweaking.

      However, doing this raises a few questions, for which a HOWTO-style doc. entry (or enhancement to the subproject's README.md) helping users create/include/build/maintain a qtquickcontrols2 style would be nice:

      • Can I really just "copy the folder and start tweaking"?
        • Which folder? In QTDIR I find the new controls as source in 5.6/Src/qtlabscontrols/src/imports and binary in 5.6/gcc_64/qml/Qt/labs/controls.
        • It doesn't matter because it's just QML, except for a few cpp/h files that seem to be dependencies of the skin, resulting into a qtlabsmaterialstyleplugin.so shared object. So am I supposed to build this myself as part of my project, or should I just copy the QMLs+so from QTDIR into my project and dump them into a qrc ?
      • Could I avoid creating my own style and thus forking Qt's material theme? The recommendation to "copy the folder and start tweaking" sounds nice for users wanting total control over the complete style. But suppose instead I'm mostly happy with Material and only want to override some attributes, much like I would do with CSS in a webapp. Because all the tweaking is done by defining whole sub-items for each control (e.g. defining the whole label and background for a Button), it doesn't look like I can make granular "overrides" inside sub-items.
        • Right? Right, as confirmed by JP Nurmi on the mailing list thread, this forum discussion explain why things are the way they are.
        • If right, following the documentation, I'd just copy the whole material folder and start tweaking, but then I'll have to merge my tweaks with upstream changes brought by each Qt release. Correct? Is this the workflow you have in mind?

      I'm a new Qt user and more experienced users would probably find their way anyway, but I hope my perspective can convince maintainers that a bit more documentation —to a still extremely young module, I know! No furniture throwing here— would be great.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mitch_curtis Mitch Curtis
            ronjouch Ronan Jouchet
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes