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 invisible in Qt 5.9 works fine in 5.8
Qt 6.11 is out! See what's new in the release blog

image invisible in Qt 5.9 works fine in 5.8

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 647 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Marek
    wrote on last edited by
    #1

    Hi,

    I have fairly simple MapQuickItem

    MapQuickItem {
        property int rs_id
        property int item_type: 1 //1-marker 2-circle 3-navi 4-bus 5-info
        property int naviMap;
        property int pressed: 0
        property int old_x;
        property int old_y;
        property int moved: 0
        visible: true;
        sourceItem: Image {
            id: image
            scale: 0.1
            source: "images/map-marker-blue.png"
            visible: true
    
        }
        anchorPoint.x: image.width/2
        anchorPoint.y: image.height
    }
    

    It works fine with Qt 5.8 and is invisible with Qt 5.9
    With 5.9 no error is being shown, I just can't see the image, if I make intentional mistake in source url it complains:

    qrc:/MarkerItem.qml:15:17: QML Image: Cannot open: qrc:/images/map-marker-blu.png
    

    But when the path is correct, no error is written and the image is simply invisible, component is created it even has the right size, but it is just like completely transparent. I have tested on Windows 10 and Linux 64Bit
    Has something changed in 5.9 or what?

    Best Regards
    Marek

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Marek
      wrote on last edited by
      #2

      Ok, I have found the problem:

      scale: 0.1
      

      This settings does not work in Qt 5.8 (item is always 100% size) and it does in 5.9
      My mistake.

      Regards
      Marek

      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