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

Native style support for Qt Quick Controls 2

    XMLWordPrintable

    Details

    • Type: User Story
    • Status: In Progress
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Sprint:
      Shovelling Snow, Q1/2020 Finale, Q2/2020 kick off, WIP and Qt 6

      Description

      This work document describes the ongoing work to port QStyle to QtQuick Controls 2, with the overall goal of improving support for writing desktop applications with a native Look-And-Feel.

      Controls available, but missing native style (supported by QStyle)

      • ToolButton (Button with menu)
      • ToolSeparator

      Controls available, but missing native style (unsupported by QStyle)

      • Switch
      • RangeSlider
      • BusyIndicator
      • DelayButton
      • PageIndicator
      • Tumbler

      Controls missing (compared to Qt Widgets)

      • TabView
        • cannot be composed as TabBar + StackView, it's has more combined visuals on e.g macOS
      • ScrollableTextArea (same concept as on macOS)
        • or improve support putting TextArea inside ScrollView
      • QToolBar
        • ToolBar (and side bar) should have a combined visual look on macOS
      • QFontComboBox
      • QTimeEdit
      • QDateEdit
      • QKeySequenceEdit
      • QMdiArea
      • QMdiSubWindow
      • QDockWidget
      • QToolBox
      • QCommandLinkButton
      • Line (in Qt Designer, which is a Frame. Integrate into ToolSeparator?)

      Controls missing (compared to XCode IB)

      • Segmented button (mac) in controls1 as ButtonGroup/ButtonRow?
      • SearchField 

       Controls available, but with missing API (compared to Qt Widgets)

      • Small and Mini API for most controls
      • TextArea
        • BorderStyle. Important to be able to place it inside e.g a Frame or a ScrollView that already has a frame.
        • Putting it inside a ScrollView should just work
          • suffers from the same problems as with flickable above.
        • frameStyle (Shape, Shadow)
        • frameShape (Box, Panel, WinPanel, etc)
          • or perhaps borderStyle (border is more QML): (none, Line, bezel, rounded)
            sborder style/frameShape (none, Line, bezel, rounded)
      • ScrollBar
        • Add API to specify if a scrollbar should be transient or not (fade away when not used). Currently a scrollbar is transient if the the policy is ScrollBar.AsNeeded. But this is different for a desktop style where the scrollbar should typically stay or hide depending on the content/viewport ratio, and not if it's being actively used. This should also control if the scrollbars are used as overlays in ScrollArea, or placed on the side of the contents.
        • On mac, work is needed to animate transient scrollbars.
        • On mac, the background should sometimes have a frame, other times not. But it looks like the stand-alone version should not have any frames. But when used in a NSScrollView, it should. So investigate more how to decide when to use a frame, and how to draw it.
        • If a flickable has both vertical and horizontal scrollbars, they overlap in the bottom-right corner. This looks wrong when the scrollbars have a background. A fix could be to resize the scrollbars differently when the background delegate is set/visible.
      • GroupBox
        • Checkable groupboxes (a checkbox can be placed in the groupbox title)
      • ToolButton
        • Missing a menu API. The button should be styled with an arrow if it opens a menu, so hacking this together from the app will probably not be enough?
      • Slider
        • Missing tick-marks API
      • Dial
        • Missing tick-marks API

      Other things that needs to be done

      • Make "default" style be the platform style. And rename "default style" to e.g "plain style" 
      • Adjust all layout rects, and verify that controls look as expected with layouts
      • Add cmake support
      • Add native menus/popups (for combobox, tooltip, etc)
        • Read QPlatformTheme

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              richard Richard Moe Gustavsen
              Reporter:
              dedietri Gabriel de Dietrich (drgvond)
              Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes