How to add an image to your QT Quick Application | QT6 | QT Creator 10.0.0

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • This video is a tutorial to help you with adding images to you QT Quick application build on QT6 using QT Creator. Hope this helps.
    Have a nice day !
    -----------------
    Code used
    ----------------
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTORCC ON)
    #qt
    #qt6
    #qt creator
    #image
    #Qt_quick
    #QtQML
    #tutorial
    #educational

Комментарии • 10

  • @quanchyplimp
    @quanchyplimp Год назад +1

    Very helpful!, in fact, this is the only help I've been able to find on the subject of adding an image to my project, far short of asking on the QT forum. Thanks again!

  • @ArnavJha-i8l
    @ArnavJha-i8l Год назад

    The more I'm working with Qt, the more I feel grateful to JS gods to make their language bearable and easy-to-use for beginners.
    Thanks for this tutorial brother, I'm finally free from suffering.

  • @harishrawgi6967
    @harishrawgi6967 Год назад

    Best QT image tutorial I ever saw!!

  • @MO-fg2cm
    @MO-fg2cm 2 месяца назад +1

    Thanks bud ...

  • @annastyrdesign173
    @annastyrdesign173 10 месяцев назад

    Very helpful, thank you so much!

  • @PaoloGuasti
    @PaoloGuasti Год назад

    I followed the tutorial and the image display correctly in the executable program but, for some reason, it do not display in the designer mode. If I change the qml image source attribute removing "qrc:/" before the file name the behaviour became the opposite: the image display in the editor but not in the executable

    • @harshpathak8029
      @harshpathak8029  Год назад

      To view the image on the Editor mode, you need to click on the Images.qrc folder and then click on your image (as shown in the video).
      To view image in the design mode...Firstly (When in design mode ) change it from Basic -> Essentials layout . There is a Drop Down Menu [ at the right hand side of the screen just below the Close button(X) ] to do so. When in the Essential layout , there are many options and tabs. Then you need to click on the Assets tab. Assets tab is next to the Components tab . [ Left hand side of the screen]. Your image in design mode is under the Assets tab.
      With respect to the executable , On my machine when I run it ( using Ctrl+R ) with the qrc (url path) as shown in the video, it works just fine in both cases.
      Hope that helps =) . You may google QT documentation for more information . If the issue persists, feel free to ask on stack overflow. They can help too.