# Progress bar window's inside is transparent when displaying it

**URL:** <https://discourse.slicer.org/t/progress-bar-windows-inside-is-transparent-when-displaying-it/34107>\
**Category:** Development\
**Tags:** python, gui\
**Created:** [February 2, 2024, 8:20am UTC](https://discourse.slicer.org/t/progress-bar-windows-inside-is-transparent-when-displaying-it/34107 "2024-02-02T08:20:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_J](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel_j/32/68940_2.png) [@Gabriel\_J](https://discourse.slicer.org/u/Gabriel_J)\
**Post date:** [February 2, 2024, 8:20am UTC](https://discourse.slicer.org/t/progress-bar-windows-inside-is-transparent-when-displaying-it/34107/1 "2024-02-02T08:20:45Z")

</div>

Hello,

I’m developing a Python plugin using the Extension Wizard template as the code basis, and I would like to add a loading bar.

I’ve seen that it can be done like this:

```python
progress_bar = slicer.util.createProgressDialog(parent=slicer.util.mainWindow(), autoClose=False, labelText="Please wait", windowTitle="Painting contour...", value=0)
progress_bar.setCancelButton(None)
slicer.app.processEvents()

```

Here’s a screenshot of what it looks like:

 ![Screenshot from 2024-01-31 21-47-26](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/3/43b8c40a1b107105c25cb099b85508a590bf0de5.jpeg)

How can I make the window appear correctly?  
Note that the window is encapsulated within:

```python
with slicer.util.tryWithErrorDisplay("Failed to compute segmentation.", waitCursor=True):

```

and when an error occurs, it displays the error window and the progress bar window correctly (with the bar, the inside text and the window background).

I’m using Slicer 5.4.0 r31938 / 311cb26 on Ubuntu LTS 22.04.3.

---

<div class="post-metadata">

**Author:** ![Gabriel\_J](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel_j/32/68940_2.png) [@Gabriel\_J](https://discourse.slicer.org/u/Gabriel_J)\
**Post date:** [February 6, 2024, 7:51am UTC](https://discourse.slicer.org/t/progress-bar-windows-inside-is-transparent-when-displaying-it/34107/2 "2024-02-06T07:51:41Z")

</div>

Actually, updating the value of the bar, and using slicer.app.processEvents()  
make the background appear, so my issue is no more an issue.
