Hii all.. I have placed my widget which contains a gridlayout with 2 pushbuttons on a mainwindow. I tried to set background color to my widget but only the children of it say the 2 buttons are changing to specified color but not the whole widget. Can anyone give me the reason.

Also I want this widget to accept all events happening to mainwindow until it is explicitly closed or click the cancel button which is on the widget. During this can i make the background of widget that is remaining part of mainwindow to some other color. No events should happen to other widgets on the mainwindow when this widget is visible on mainwindow.

I tried with QDialog with setmodal property and it block all events to mainwindow until it is closed but this dialog comes as a seperate window but not as a part of mainwindow. I want this widget as a part of mainwindow and accept all events happening to the mainwindow disabling the other widgets on the mainwindow.


..

Thanks
Jay