I'm facing an issue with pyQT. So I created a graphical interface with designer, containing a QTabWidget. The things is I would like to hide and show tabs when my function is running. I found one solution that consists in removing all the tabs and adding them later. Lets say I only have two tabs :
removedTab = self._application.getAlgorithmGUI().getWidget('tabWidget_Verification').widget(1)
self._application.getAlgorithmGUI().getWidget( 'tabWidget_Verification' ).removeTab( 1 )
And when I try later to add this removed tab, my program crashes.
self._application.getAlgorithmGUI().getWidget( 'tabWidget_Verification' ).addTab(removedTab,QString.fromUtf8("TabRemoved"))
This is my error message :
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
<unknown>: Fatal IO error 11 (Ressource temporairement non disponible) on X server :0.0.
Any suggestions?