We are in the territory where your solution (using __init__) is the way to go. Multiple inheritance in Python is quite tricky...
QObject expects an optional parent parameter which is not given here but it's not expecting the parameters for the QGraphicsLineItem constructor hence the failure. You can try to use the kwargs trick however it won't work either as it's not part of any of the method signature and thus can't work either.
That is great. Thank you very much for your time and help.
Would you have any (open source) pyqt projects you would recommend to look at and learn from?
I've got a couple of good books but they usually have small examples focused on specific topics, not complete projects. I'm currently mostly looking at how https://github.com/dietervansteenwegen/serial-tool is set up and try to understand and copy (if it makes sense) that.
Hmmm... actually, I finally made it : and the solution was... to remove margins from theQHBoxLayout of the QWidget !
Jesus ! I'll have to carefully remember that one 😅
It looks like your signal-slot connection is stacking each time you open the child window. Try disconnecting the signal before reconnecting it in handlePlot() using window.signal.disconnect(self.handleData). This should prevent multiple calls to handleData(). My cousin, who is a professional photographer, was always struggling with sending full-resolution images to clients. After trying various platforms, he finally settled on Filemail, and it has been a game-changer for him. No compression, no sign-ups for recipients, and super-fast uploads—everything he needed for hassle-free file transfers.
AFAIK, both packages can coexist in the same environment as they come each with their own build of Qt.
However, to get better help, as @jsulm suggested, you should bring that issue to the Salome forum.
@abiabi
Because Qt Designer/Creator is not particularly Python-oriented.
The accepted solution from @eyllanesc is the way to go, as with his other Python posts.
Hum I am using poetry and as it is showed in the project, there is no specified version (so it takes the latest if available). It works perfectly out of the poetry world yes for sure, but not in poetry one...
@BGrimaud
If you delete the ui_...py file and resave does that recreate it, and reflect new changes?
Do you have the option to try a newer version of Creator?
Please run your app in debugger to see where that happens
Dear @jsulm,
Thank you for your suggestion. I did execute the application using the debugger; however, it encountered an issue at the first line of the init_gl function, displaying a message indicating "disconnected unexpectedly." Unfortunately, no further information was provided.
We actually provide a tool,
pyside6-project , which defines a simple project file format and can do these steps automatically and can also be opened in Qt Creator.
@RemDup
The alternative way which should work is not to load the stacked widget initially. Show the main window and set off a 0 duration singleshot timer before entering the main event loop. In the slot, which will be run just after the main window (or whatever) is shown, create and load the other widgets.