Index: /trunk/source/interfaces/basic/include/G4UIQt.hh
===================================================================
--- /trunk/source/interfaces/basic/include/G4UIQt.hh	(revision 1231)
+++ /trunk/source/interfaces/basic/include/G4UIQt.hh	(revision 1232)
@@ -100,6 +100,8 @@
   // Ex : AddButton("my_menu","Run","/run/beamOn 1"); 
 
-  void AddTabWidget(QWidget*,QString,int,int);
+  bool AddTabWidget(QWidget*,QString,int,int);
   // To add a tab for vis openGL Qt driver
+  
+  bool IsSplitterReleased();
 
 public:
Index: /trunk/source/interfaces/basic/src/G4UIQt.cc
===================================================================
--- /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1231)
+++ /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1232)
@@ -295,4 +295,15 @@
 #endif
 
+  // Set visible
+#if QT_VERSION >= 0x040000
+#if QT_VERSION >= 0x040200
+  fMainWindow->setVisible(true);
+#else
+  fMainWindow->show();
+#endif
+#else
+  fMainWindow->show();
+#endif
+
 #ifdef G4DEBUG_INTERFACES_BASIC
   printf("G4UIQt::G4UIQt END\n");
@@ -478,5 +489,5 @@
   Create the tab if it was not done
 */
-void G4UIQt::AddTabWidget(
+bool G4UIQt::AddTabWidget(
  QWidget* aWidget
 ,QString name
@@ -485,8 +496,9 @@
 )
 {
+
 #ifdef G4DEBUG_INTERFACES_BASIC
   printf("G4UIQt::AddTabWidget %d %d\n",sizeX, sizeY);
 #endif
-  if (!aWidget) return;
+  if (!aWidget) return false;
   
 #ifdef G4DEBUG_INTERFACES_BASIC
@@ -499,9 +511,59 @@
   aWidget->setParent(fTabWidget);
 #endif
-    
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::AddTabWidget resize VVVVVVVVVVVG4UIQt G4UIQt G4UIQt G4UIQt G4UIQt G4UIQt G4UIQt G4UIQt \n");
+  printf("G4UIQt::AddTabWidget resize 22222222222 W---:%d + sx:%d -fwx:%d   H---:%d + sy:%d -fwy:%d    TabW:%d TabH:%d G4UIQt G4UIQt aWX:%d aWY:%d\n",fMainWindow->width(),sizeX,fTabWidget->width(),fMainWindow->height(),sizeY,fTabWidget->height(),fTabWidget->width(),fTabWidget->height(),aWidget->size().height(),aWidget->size().width());
+#endif
+
+  fMainWindow->resize(fMainWindow->width()+sizeX-fTabWidget->width(),fMainWindow->height()+sizeY-fTabWidget->height());
+
+  // Problems with resize. The widgets are not realy drawn at this step,
+  // then we have to force them on order to check the size
+
   fTabWidget->insertTab(fTabWidget->count()-1,aWidget,name);
-  
-  fMainWindow->resize(fMainWindow->width()+sizeX-fTabWidget->width(),
-                      fMainWindow->height()+sizeY-fTabWidget->height());
+ 
+  // Set visible
+#if QT_VERSION >= 0x040000
+#if QT_VERSION >= 0x040200
+  fMainWindow->setVisible(true);
+#else
+  fMainWindow->show();
+#endif
+#else
+  fMainWindow->show();
+ #endif
+  
+  
+
+// //   // Check size
+// //   int offX = (sizeX-aWidget->size().width());
+// //   int offY = (sizeY-aWidget->size().height());
+
+// // #ifdef G4DEBUG_INTERFACES_BASIC
+// //   printf("G4UIQt::AddTabWidget resize AFTER FIRST W:%d + sx:%d -fwx:%d   H:%d + sy:%d -fwy:%d    TabW:%d TabH:%d G4UIQt G4UIQt offX:%d  offY:%d aWX:%d aWY:%d\n",fMainWindow->width(),sizeX,fTabWidget->width(),fMainWindow->height(),sizeY,fTabWidget->height(),fTabWidget->width(),fTabWidget->height(),offX,offY,aWidget->size().height(),aWidget->size().width());
+// // #endif
+
+// //   // and correct if necessairy
+// //   if ((offX != 0) ||(offY != 0)) {
+// //     fMainWindow->resize(fMainWindow->width()+offX,fMainWindow->height()+offY);
+// //     // Re-Set visible
+// // #if QT_VERSION >= 0x040000
+// // #if QT_VERSION >= 0x040200
+// //     fMainWindow->setVisible(true);
+// // #else
+// //     fMainWindow->show();
+// // #endif
+// // #else
+// //     fMainWindow->show();
+// // #endif
+// //   }
+
+// // #ifdef G4DEBUG_INTERFACES_BASIC
+// //   printf("G4UIQt::AddTabWidget resize ^^^^^^^^^^^^ W:%d + sx:%d -fwx:%d   H:%d + sy:%d -fwy:%d    TabW:%d TabH:%d G4UIQt G4UIQt offX:%d  offY:%d aWX:%d aWY:%d\n",fMainWindow->width(),sizeX,fTabWidget->width(),fMainWindow->height(),sizeY,fTabWidget->height(),fTabWidget->width(),fTabWidget->height(),offX,offY,aWidget->size().height(),aWidget->size().width());
+// // #endif
+printf("G4UIQt::AddTabWidget  END\n");
+// // #endif
+  
+  return true;
 }
 
@@ -555,6 +617,12 @@
 )
 {
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt SessionStart\n");
+#endif
 
   G4Qt* interactorManager = G4Qt::getInstance ();
+
+  Prompt("Session :");
+  exitSession = false;
 
 #if QT_VERSION >= 0x040000
@@ -567,8 +635,8 @@
   fMainWindow->show();
 #endif
-  Prompt("Session :");
-  exitSession = false;
-
-
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt SessionStart2\n");
+#endif
   interactorManager->DisableSecondaryLoop (); // TO KEEP
   if ((QApplication*)interactorManager->GetMainInteractor())
@@ -1764,3 +1832,4 @@
   return commandResultMap;
 }
-#endif
+
+#endif
Index: /trunk/source/interfaces/common/src/G4Qt.cc
===================================================================
--- /trunk/source/interfaces/common/src/G4Qt.cc	(revision 1231)
+++ /trunk/source/interfaces/common/src/G4Qt.cc	(revision 1232)
@@ -240,6 +240,5 @@
 {
   if (fG4UI != NULL) {
-    fG4UI->AddTabWidget(vis,name,sizeX,sizeY);
-    return true;
+    return fG4UI->AddTabWidget(vis,name,sizeX,sizeY);
   }
   return false;
