Forums

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

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

    Marco Pedersen

    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
    Felgo Team

    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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support