PDA

View Full Version : Started using QT creator... how can I insert an image in my window?



danoc93
19th January 2012, 00:57
Hi, I started using QT... I was using WxWidgets but I found it horribly confusing and there weren't many tools like qt creator, only wxdevc++, which had a lot of bugs...


My problem is, I can't insert an image in my window... I don't find the option anywhere... a little help could be useful :D... in wxdevc++ i could insert one by clicking "bitmap" under the many options of the designing area...

I'm working on a QT gui application for a c++ project...

stampede
19th January 2012, 09:30
If you are using Qt Designer - place a QLabel on your widget, select it, go to "Property Editor", scroll down to "QLabel" section. There will be a field titled "pixmap", push the "down arrow" on the right, there will be an option to "Choose file", then browse for your image.

eltecprogetti
1st March 2012, 10:14
Ok, the image appear into the qlabel space.

But when I execute the project, the qlabel appear empty, the image isn't visible.

Urthas
2nd March 2012, 02:59
Read this (http://www.qtcentre.org/threads/45104-Image-not-appearing-in-Qlabel-after-compiling)and see if it helps.