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

SplitView's handle is in the pressed or hovered state when the application is launched.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 5.3.0
    • 5.2.0
    • Quick: Controls 1
    • None
    • Operating System: Windows 8.1 Professional (64-bit).
      Kit (Compiler): MinGW 4.8 (32-bit) (the one that comes with Qt 5.2.0; I guess, the version is 4.8.0-1-1 (it's specified in the maintenance tool)).

    Description

      Here's the source code that shows the issue.

      SplitView.qml
      import QtQuick 2.1
      import QtQuick.Controls 1.1
      import QtQuick.Layouts 1.1
      import QtQuick.Window 2.0
      
      ApplicationWindow {
          title: qsTr("SplitView")
          width: 640
          height: 480
      
          SplitView {
              anchors.fill: parent
              orientation: Qt.Horizontal
      
              handleDelegate: Rectangle {
                  color: (styleData.hovered || styleData.pressed) ? "red" : "blue"
                  width: 4
              }
      
              Rectangle {
                  width: 200
                  color: "gray"
              }
      
              Rectangle {
                  Layout.fillWidth: true
                  color: "darkgray"
              }
          }
      }
      

      Scenario

      I want to highlight the handle (using specific color) when it's in the hovered or pressed state. When the handle is neither hovered nor pressed, it must use another color.

      (In reality, I want the handle to be transparent (on white background), and highlight it with something like "whitesmoke".)

      Current Behavior

      When the application is launched, the handle is highlighted (it looks like it's in the pressed state, because the mouse cursor is not on top of the handler).

      This is wrong, because, in reality, the handle is neither pressed nor hovered.

      I'd also like to add that I noticed that this always happens if the SplitView's orientation is set to "horizontal", and only sometimes when it's set to "vertical".

      Expected Behavior

      When the application is launched, the handle must not be in a hovered or pressed state. This behavior must be in both SplitView's states: horizontal and vertical.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            havok Vladimir Kazakov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes