Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to place one widget over another in Qt

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

like image 650
Naruto Avatar asked Feb 19 '10 11:02

Naruto


1 Answers

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.

like image 184
Patrice Bernassola Avatar answered Sep 20 '22 21:09

Patrice Bernassola