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. [SOLVED]Image doesn't appear while running from qt creator
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Image doesn't appear while running from qt creator

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.3k 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.
  • A Offline
    A Offline
    Abin
    wrote on last edited by
    #1

    Hi,

    I am new with qml. I created a Qt Quick Application and created ui part.

    Code is:

    @import QtQuick 2.0

    Rectangle {
    width: 200; height: 200
    Image {
    id: image
    source: "../images/sample64.png"
    }
    }
    @

    The project when I run from the qt creator the screen appears blank (just a white screen).

    But if I open the qml file with qmlviewer, the image appears.

    Why is it so? what should I do to see the image while debugging the project?

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      You should see an error message in the application output screen. It should tell you where it looks for the image.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Abin
        wrote on last edited by
        #3

        To Eddy,

        The relative path was the issue.

        Thanks

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          great you solved it.

          could you please edit the title of your first post and add [solved] to it?

          Qt Certified Specialist
          www.edalsolutions.be

          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