pqParaViewBehaviors affects layout effects

Hi, I’m having a problem with layouts! After calling ParaView’s pqParaViewBehaviors in my Qt application, the effect of my previous layout is completely affected. After several attempts, I realized that when adding the code “new pqParaViewBehaviors(this, this);”, it affects the original layout of the QDockWidget in QMainWindow. I’m confused about this, how to solve it please? Thank you very much!

My Paraview version is 5.13.1, Qt version is 6.6.3, and my platform is windows 11.

Previous Layout:

Add Code:

Later Layout:

Please share actual code.

You can find examples using pqParaViewBehaviors in Examples/CustomApplications

Thank you for your response! The above example is actually modified from “Examples/CustomApplications/Demo2”. I have attached the source code here.

Demo2.rar (3.6 KB)

If you comment out line 29 of myMainWindow.cxx “new pqParaViewBehaviors(this, this);”, you can see the correct layout. If you don’t comment it out, you can see the affected layout.