# Embedding PyQt into a custom python filter

**URL:** https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867
**Category:** ParaView Support
**Created:** [May 16, 2019, 7:29am UTC](https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867 "2019-05-16T07:29:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![e-kolosov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/e-kolosov/32/2375_2.png) [@e-kolosov](https://discourse.paraview.org/u/e-kolosov)
#### Post date: [May 16, 2019, 7:29am UTC](https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867/1 "2019-05-16T07:29:01Z")

</div>

Hello.  
Can i use widgets from PyQt into a custom python filter inherited from VTKPythonAlgorithmBase? I’ve created a simple example. It show a QDialog but don’t process mouse events on button.  
Thanks in advance.  
[test\_pyqt.py](https://discourse.paraview.org/uploads/default/original/2X/c/c3240a25aa401fca5f5f06b544de687e5c0ce803.py) (2.0 KB)

---

<div class="post-metadata">

### Author: ![e-kolosov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/e-kolosov/32/2375_2.png) [@e-kolosov](https://discourse.paraview.org/u/e-kolosov)
#### Post date: [May 17, 2019, 7:06am UTC](https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867/2 "2019-05-17T07:06:54Z")

</div>

I edited example. It work now. Is it a correct use case?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 17, 2019, 5:26pm UTC](https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867/3 "2019-05-17T17:26:08Z")

</div>

This is not a good practice in general. ParaView is intended to operate in client-server mode and desktop-only mode seamlessly. In client-server configuration, the `TestEmbeddingPyQt` will be instantiated only on the server processes. Hence the dialog that you pop up will show up on the server ranks and never on the client rank. If the server ranks are on remote HPC system for example, the user will never see the dialog!

---

<div class="post-metadata">

### Author: ![e-kolosov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/e-kolosov/32/2375_2.png) [@e-kolosov](https://discourse.paraview.org/u/e-kolosov)
#### Post date: [May 20, 2019, 7:09am UTC](https://discourse.paraview.org/t/embedding-pyqt-into-a-custom-python-filter/1867/4 "2019-05-20T07:09:05Z")

</div>

Thanks, Utkarsh!
