You are not logged in.

1

Friday, October 7th 2011, 8:08am

Adding and Image to The main window

Hi Guys

well i am new to Qt programming as my name says i am i have been trying to add an image to my main window i have gone through the whole help file and also found something but i am not sure how you would do that any help please.

Junior

Professional

  • "Junior" is male

Posts: 1,613

Location: San Antonio, TX USA

Occupation: Senior Secure Systems Engineer

  • Send private message

2

Friday, October 7th 2011, 1:53pm

Welcome qtLearn071,

This has been answered many times on this board so a quick search probably would of provided you the results your were looking for.

There are a couple of ways of doing this. Either through the background role or using style sheets of the main window frame work.

(e.g. mainwindow->setStyleSheet( "image: url( filename );" ); // note: filename could be from qt resource file or absolute path/filename. )