views:

256

answers:

2

Hi..

i have a window in QT, on that i am drawing a picture. now i want to place the progressbar over it. how can i do that?..

steps i am following to do 1) Create a window,

2)draw picture in paint event of window

3)then create QGridLayout layout, add your window

4) Display over it.

suppose i want to add progress bar, over a portion of picture window. how can i do that

i dont think its possible to implement in window paint event.

please assist me

Thanks

A: 

I think that just adding a progress bar widget to your grid layout should work.

batbrat
Hey the problem is, first gadget which i have added is fitting full to my client screen.. so then where to place next gadget.i want to place next gadget i.e progress bar over image window.
Shadow
+2  A: 

You can add the progress bar as child of your QWidget without adding it in the layout. This will draw the QProgressBar into the QWidget. Since you are not using the layout you will have to manually manage the position of the QProgressBar.

Patrice Bernassola
Ya..your method worked.. one more question.cant i create another layout add progress bar to it and set it to the image window layout?.. . i m trying like this its not coming.is it possible or not?
Shadow
Since you can add a layout to a layout (using the addItem function) I guess you can.
Patrice Bernassola