Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 633)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 635)
@@ -80,11 +80,11 @@
     QGroupBox *imageGroupBox = new QGroupBox(tr("Image quality"),this);
     QVBoxLayout *imageGroupBoxLayout = new QVBoxLayout(imageGroupBox);
-    QWidget *sliderBox = new QWidget;
-
-    QHBoxLayout *hSlider = new QHBoxLayout(sliderBox);
+    QWidget *sliderBox = new QWidget();
+
+    QHBoxLayout *hSliderLayout = new QHBoxLayout(sliderBox);
 
     //    qualityLabel =  new QLabel( tr( "Image quality" ) );
     //    imageGroupBoxLayout->addWidget(qualityLabel);
-    qualitySlider= new QSlider(Qt::Horizontal,this);
+    qualitySlider= new QSlider(Qt::Horizontal,sliderBox);
 #if QT_VERSION < 0x040000
     qualitySlider->setMinValue(0);
@@ -97,9 +97,9 @@
 #endif
     qualitySlider->setValue(60);
-    hSlider->addWidget(new QLabel("low",this));
-    hSlider->addWidget(qualitySlider);
-    hSlider->addWidget(new QLabel("Maximum",this));
-#if QT_VERSION >= 0x040000
-    sliderBox->setLayout(hSlider);
+    hSliderLayout->addWidget(new QLabel("low",sliderBox));
+    hSliderLayout->addWidget(qualitySlider);
+    hSliderLayout->addWidget(new QLabel("Maximum",sliderBox));
+#if QT_VERSION >= 0x040000
+    sliderBox->setLayout(hSliderLayout);
 #endif
     imageGroupBoxLayout->addWidget(sliderBox);
@@ -117,15 +117,15 @@
     //    transparencyEPS->setChecked( true );
 
-    colorButton = new QRadioButton("Color",this);
-    BWButton = new QRadioButton("Grayscale",this);
-
     QWidget * EPSWidgetGroupBox; // widget containing group button
     QButtonGroup * EPSButtonGroupBox; // group button 
-#if QT_VERSION < 0x040000
+
+
+#if QT_VERSION < 0x040000
+    colorButton = new QRadioButton("Color",EPSWidgetGroupBox);
+    BWButton = new QRadioButton("Grayscale",EPSWidgetGroupBox);
     EPSButtonGroupBox = new QButtonGroup( 2,Qt::Vertical, tr("EPS options"),this);
     EPSButtonGroupBox->insert(colorButton);
     EPSButtonGroupBox->insert(BWButton);
     EPSButtonGroupBox->setExclusive(true);
-    colorButton->setChecked( true );
     EPSWidgetGroupBox = EPSButtonGroupBox;
 
@@ -133,6 +133,9 @@
     EPSWidgetGroupBox = new QGroupBox(tr("EPS options"));
     QVBoxLayout *EPSGroupBoxLayout = new QVBoxLayout(EPSWidgetGroupBox);
+
+    colorButton = new QRadioButton("Color",EPSWidgetGroupBox);
+    BWButton = new QRadioButton("Grayscale",EPSWidgetGroupBox);
+
     EPSButtonGroupBox = new QButtonGroup();
-    colorButton->setChecked( true );
     EPSButtonGroupBox->addButton(colorButton);
     EPSButtonGroupBox->addButton(BWButton);
@@ -144,4 +147,5 @@
 
 #endif
+    colorButton->setChecked( true );
 
     //    EPSGroupBoxLayout->addWidget(transparencyEPS);    
@@ -159,5 +163,5 @@
     QVBoxLayout *transparencyGroupBoxLayout = new QVBoxLayout(transparencyGroupBox);
 
-    boxTransparency = new QCheckBox("Save transparency",this);
+    boxTransparency = new QCheckBox("Save transparency",transparencyGroupBox);
     boxTransparency->setChecked( false );
     //    boxTransparency->setEnabled(false);
@@ -172,12 +176,7 @@
 
   // size box
-  QWidget* modifyAndRatioWidget = new QWidget;
+  QWidget* modifyAndRatioWidget = new QWidget();
 
   QHBoxLayout *modifyAndRatioLayout = new QHBoxLayout(modifyAndRatioWidget);
-
-  // original button
-  original = new QRadioButton("Original",this);
-  // modify and ratio
-  modify = new QRadioButton("Modify",this);
 
   QWidget * sizeWidgetGroupBox; // widget containing group button
@@ -193,5 +192,4 @@
   sizeButtonGroupBox->insert(modify);
   sizeButtonGroupBox->setExclusive(true);
-  original->setChecked( true );
   sizeWidgetGroupBox = sizeButtonGroupBox;
   sizeGroupBoxLayout = sizeWidgetGroupBox->layout();
@@ -202,5 +200,4 @@
   sizeGroupBoxLayout = new QVBoxLayout(sizeWidgetGroupBox);
   sizeButtonGroupBox = new QButtonGroup();
-  original->setChecked( true );
 
   original = new QRadioButton("Original");
@@ -216,4 +213,5 @@
   sizeWidgetGroupBox->setLayout(sizeGroupBoxLayout);
 #endif
+  original->setChecked( true );
 
 
@@ -244,5 +242,5 @@
 
   // height
-  heightWidget = new QWidget;
+  heightWidget = new QWidget();
 
   QHBoxLayout *heightLineLayout = new QHBoxLayout(heightWidget);
@@ -250,6 +248,6 @@
   QString tmp;
  
-  heightLineLayout->addWidget(new QLabel("Height",this));
-  height = new QLineEdit(tmp.setNum(originalHeight),this);
+  heightLineLayout->addWidget(new QLabel("Height",heightWidget));
+  height = new QLineEdit(tmp.setNum(originalHeight),heightWidget);
   height->setMaxLength(5);
 #if QT_VERSION < 0x040000
@@ -270,5 +268,5 @@
 
   // width
-  widthWidget = new QWidget;
+  widthWidget = new QWidget();
 
   QHBoxLayout *widthLineLayout = new QHBoxLayout(widthWidget);
@@ -279,5 +277,5 @@
   widthLineLayout->addWidget(new QLabel("Width ",widthWidget));
 #endif
-  width = new QLineEdit(tmp.setNum(originalWidth),this);
+  width = new QLineEdit(tmp.setNum(originalWidth),widthWidget);
   width->setMaxLength(5);
 #if QT_VERSION < 0x040000
