Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Images in Qt Creator UI Designer



  • I'd like to place an image on a form. When I look through the available objects in UI Designer, the only one that seems to come close is GraphicsView. When I add it to my form, I don't see anywhere to give an image source.

    1. Is GraphicsView the correct object to place?
    2. I'd like to add a function to run whenever the image is clicked. Do I just add the function on_whateverobject_clicked?


  • You can use a qlabel. It has an icon property you can set. Also have a look at the Qt resource system.

    Then connect the clicked signal to the slot you want.


Log in to reply