Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Image in QQuick3D mesh not preserving aspect ratio
Forum Updated to NodeBB v4.3 + New Features

Image in QQuick3D mesh not preserving aspect ratio

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 147 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Developer Harrison
    wrote on last edited by Developer Harrison
    #1

    I am trying to load an image in a mesh (#Cube) but the image is not preserving aspect ratio. I need assistance

    Below is my code

    Node {
    
                //eulerRotation: Qt.vector3d(20, -40 + cubeRotation, -10 + cubeRotation)
                eulerRotation: Qt.vector3d(10, -5, -10 + cubeRotation)
    
                Model {
    
                    id: qtCube
                    source: "#Cube"
                    scale: Qt.vector3d(3.5, 3.5, 3.5)
                    opacity: 0
    
                    materials: DefaultMaterial {
                        diffuseMap: Texture { source: "file:///home/pi/mybiz/favourites/" +cubeBurstSource }
                        //diffuseMap: Texture { source: "image://images/result" }
                    }
                }
    
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved