Index: /trunk/geant4/interfaces/basic/GNUmakefile
===================================================================
--- /trunk/geant4/interfaces/basic/GNUmakefile	(revision 489)
+++ /trunk/geant4/interfaces/basic/GNUmakefile	(revision 490)
@@ -16,4 +16,6 @@
 CPPFLAGS += -I$(G4BASE)/interfaces/common/include
 CPPFLAGS += -I$(G4BASE)/intercoms/include
-
+ifdef G4UI_USE_QT
+  all := `/usr/local/Qt/4.2.2/bin/moc -DG4UI_USE_QT include/G4UIQt.hh -o src/G4UIQt_moc.cc`
+endif
 include $(G4INSTALL)/config/common.gmk
Index: /trunk/geant4/interfaces/basic/include/G4UIQt.hh
===================================================================
--- /trunk/geant4/interfaces/basic/include/G4UIQt.hh	(revision 489)
+++ /trunk/geant4/interfaces/basic/include/G4UIQt.hh	(revision 490)
@@ -31,5 +31,5 @@
 #define G4UIQt_h 
 
-//#if defined(G4UI_BUILD_QT_SESSION) || defined(G4UI_USE_QT)
+#if defined(G4UI_BUILD_QT_SESSION) || defined(G4UI_USE_QT)
 
 #include <map>
@@ -42,4 +42,5 @@
 #include <QtGui/qtextedit.h>
 #include <QObject>
+
 class G4UIsession;
 
@@ -64,5 +65,6 @@
 // Class description - end :
 
-class G4UIQt : public G4VBasicShell, public G4VInteractiveSession {
+class G4UIQt : public QObject, public G4VBasicShell, public G4VInteractiveSession {
+  Q_OBJECT
 
 public: // With description
@@ -102,21 +104,12 @@
   G4bool fHelp;
   G4int fHelpChoice;
-  QMainWindow *fMainWindow;
-  UIQtCentralWidget *fCentralWidget;
-};
-
-class UIQtCentralWidget : public QWidget, public QObject {
-
-Q_OBJECT
-
-  QLineEdit *promptArea;
+  QMainWindow * mainWindow;
+  QLineEdit * promptArea;
   QTextEdit *textArea;
-
-private slots:
-  void clearButtonCallback();
+  //  static void ButtonCallback(Widget,XtPointer,XtPointer);
 
 };
 
-//#endif
+#endif
 
 #endif
Index: /trunk/geant4/interfaces/basic/src/G4UIQt.cc
===================================================================
--- /trunk/geant4/interfaces/basic/src/G4UIQt.cc	(revision 489)
+++ /trunk/geant4/interfaces/basic/src/G4UIQt.cc	(revision 490)
@@ -64,29 +64,4 @@
 static G4bool exitPause = true;
 static G4bool exitHelp = true;
-
-
-UIQtCentralWidget::UIQtCentralWidget (
-) : QWidget()
-/***************************************************************************/
-/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
-{
-  QVBoxLayout* vBox = new QVBoxLayout();
-  textArea = new QTextEdit();
-  QLabel *sessionLabel = new QLabel("Session : ");
-  QPushButton *clearButton = new QPushButton("clear");
-  connect(clearButton, SIGNAL(clicked()), SLOT(textArea->clear()));
-
-//  QMenu *menuFile = new QMenu("File");
-//  mainWindow->menuBar()->addMenu(menuFile); 
-
-  promptArea = new QLineEdit();
-  textArea->setReadOnly(FALSE);
-  vBox->addWidget(textArea);
-  vBox->addWidget(clearButton);
-  vBox->addWidget(sessionLabel);
-  vBox->addWidget(promptArea);
-  setLayout(vBox);
-}
-
 /***************************************************************************/
 /**
@@ -119,9 +94,25 @@
   G4Qt* interactorManager = G4Qt::getInstance (argc,argv,(char*)"Qt");  // TO KEEP ?
 
-  fMainWindow = new QMainWindow();
-  fMainWindow->setWindowTitle( "G4UI Session" ); 
-  fMainWindow->setBaseSize(300,200);
-  centralWidget = new UIQtCentralWidget();
-  fMainWindow->setCentralWidget(centralWidget);
+  mainWindow = new QMainWindow();
+  mainWindow->setWindowTitle( "G4UI Session" ); 
+  mainWindow->setBaseSize(300,200);
+  QWidget* centralWidget = new QWidget();
+  QVBoxLayout* vBox = new QVBoxLayout();
+  textArea = new QTextEdit();
+  QLabel *sessionLabel = new QLabel("Session : ");
+  QPushButton *clearButton = new QPushButton("clear");
+  mainWindow->connect(clearButton, SIGNAL(clicked()), SLOT(textArea->clear()));
+
+//  QMenu *menuFile = new QMenu("File");
+//  mainWindow->menuBar()->addMenu(menuFile); 
+
+  promptArea = new QLineEdit();
+  textArea->setReadOnly(FALSE);
+  vBox->addWidget(textArea);
+  vBox->addWidget(clearButton);
+  vBox->addWidget(sessionLabel);
+  vBox->addWidget(promptArea);
+  centralWidget->setLayout(vBox);
+  mainWindow->setCentralWidget(centralWidget);
 
 //  QMainWindow top = (QMainWindow)interactorManager->GetMainInteractor();
@@ -211,6 +202,6 @@
 
   
-  if (fMainWindow!=NULL)
-    delete fMainWindow;
+  if (mainWindow!=NULL)
+    delete mainWindow;
 }
 /***************************************************************************/
@@ -224,5 +215,5 @@
 {
 
-  fMainWindow->show();
+  mainWindow->show();
   qApp->exec();
 
@@ -464,14 +455,11 @@
 //}
 
-/** Callback activated when user click on the clear button
-*/
  /***************************************************************************/
- void clearButtonCallback (
- )
-/***************************************************************************/
-/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
-{
-  textArea->clear()
-}
+// void clearButtonCallback (
+// )
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+//{
+//}
 /***************************************************************************/
 // TODO !
