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

'Incorrect rendering of QML ComboBox in View3D viewport.'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.1
    • Quick: 3D
    • None
    • Windows

    Description

      After clicking on the ComboBox placed in the View3D, the dropdown list of the ComboBox is rendered in the wrong position. Attached is a screenshot with the incorrect rendering. Error generated using the Qt Quick Items Example as an example.

       

      // miejsce na kod
      
      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      #include <QtQuick3D/qquick3d.h>int main(int argc, char *argv[])
      {
          QGuiApplication app(argc, argv);
          QSurfaceFormat::setDefaultFormat(QQuick3D::idealSurfaceFormat());    QQmlApplicationEngine engine;
          engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
          if (engine.rootObjects().isEmpty())
              return -1;    return app.exec();
      }
      
      
      import QtQuick
      import QtQuick3D
      import QtQuick.ControlsWindow {
          width: 800
          height: 480
          visible: true
          title: qsTr("Quick Items Example")    View3D {
              anchors.fill: parent
              environment: SceneEnvironment {
                  clearColor: "#808080"
                  backgroundMode: SceneEnvironment.Color
                  antialiasingMode: SceneEnvironment.MSAA
                  antialiasingQuality: SceneEnvironment.High
              }        PerspectiveCamera {
                  id: camera
                  property real cameraAnimation: 1
                  SequentialAnimation {
                      loops: Animation.Infinite
                      running: true
                      NumberAnimation {
                          target: camera
                          property: "cameraAnimation"
                          to: -1
                          duration: 5000
                          easing.type: Easing.InOutQuad
                      }
                      NumberAnimation {
                          target: camera
                          property: "cameraAnimation"
                          to: 1
                          duration: 5000
                          easing.type: Easing.InOutQuad
                      }
                  }
                  position: Qt.vector3d(200 * cameraAnimation, 300, 500)
                  eulerRotation.x: -20
                  eulerRotation.y: 20 * cameraAnimation
              }        DirectionalLight {
                  eulerRotation: Qt.vector3d(-135, -110, 0)
                  brightness: 1
              }        SpotLight {
                  position: Qt.vector3d(0, 500, 600)
                  eulerRotation.x: -45
                  brightness: 30
              }        //! [walls models]
              Model {
                  source: "#Rectangle"
                  y: -500
                  scale: Qt.vector3d(12, 12, 12)
                  eulerRotation.x: -90
                  materials: DefaultMaterial {
                      diffuseColor: Qt.rgba(0.5, 0.5, 0.5, 1.0)
                  }
              }
              Model {
                  source: "#Rectangle"
                  x: -600
                  scale: Qt.vector3d(12, 10, 12)
                  eulerRotation.y: 90
                  materials: DefaultMaterial {
                      diffuseColor: Qt.rgba(0.8, 0.8, 0.6, 1.0)
                  }
              }
              Model {
                  source: "#Rectangle"
                  z: -600
                  scale: Qt.vector3d(12, 10, 12)
                  materials: DefaultMaterial {
                      diffuseColor: Qt.rgba(0.8, 0.8, 0.6, 1.0)
                  }
              }
              //! [walls models]        //! [background item]
              Node {
                  position: Qt.vector3d(0, 100, -120)
                  Item {
                      width: 400
                      height: 400
                      anchors.centerIn: parent
                      Rectangle {
                          anchors.fill: parent
                          opacity: 0.4
                          color: "#202020"
                          radius: 10
                          border.width: 2
                          border.color: "#f0f0f0"
                      }
                      Image {
                          anchors.centerIn: parent
                          source: "Built_with_Qt_RGB_logo_vertical"
                      }
                  }
              }
              //! [background item]        //! [text item]
              Node {
                  position: Qt.vector3d(0, 100, 100)            ComboBox {
                      anchors.centerIn: parent
                      model: ["First", "Second", "Third"]
                      width:100
                      height: 50
                  }
              }
          }    Button{
              id: button2d
              x:0
              y:0
              width:100
              height: 50
              text: "Button 2D"
              onClicked: {
                  console.log("Button 2D clicked");
              }
          }
      }
       


       
       
       

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            benhurr Rafal K
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes