Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › How to add images?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22245

    Felgo User

    Hello, I’m new to using Felgo and I’m having some trouble following the tutorial.

     

    I tried copy-pasting the tutorial image code example, as well as the 2 first codes from here https://felgo.com/doc/apps-howto-display-images-and-photos/ but whenever I saved and tested, my app was blank with no image.

     

    Here’s all the code:

     

    import Felgo 3.0
    import QtQuick 2.0
    
    
    App {
    
    
       NavigationStack {
    
    
         Page {
           title: "Hello Felgo"
    
    
           AppImage {
             anchors.fill: parent
             // You can try different fillModes
             fillMode: Image.PreserveAspectFit
             //fillMode: Image.PreserveAspectCrop
             //fillMode: Image.Tile
             source: "https://felgo.com/web-assets/girl.jpg"
           }
         }
       }
     }

     

    Any ideas?

    #22246

    Thomas

    Hi Marco,
    The code you provided works for me. You might try to use a local image

             source: "../assets/felgo-logo.png"
    

    to eliminate problems with your internet connection.

    Cheers,
    Thomas

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded