Index: /branches/qt_gui/acinclude.m4
===================================================================
--- /branches/qt_gui/acinclude.m4	(revision 7533)
+++ /branches/qt_gui/acinclude.m4	(revision 7534)
@@ -82,13 +82,22 @@
     _lib_check=""
     _found_lib=""
+    QT_PREFIX="$1"
 
 
-    QT_PREFIX="$1"
     QT_LIBS=""
     QT_CXXFLAGS="-I${QT_PREFIX}/include"
-    QT_LDFLAGS="-L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/lib"
+    LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/lib"
     QT_BIN_DIR="${QT_PREFIX}/bin"
-    QT_COMMON_INCLUDE_DIRECTORIES=/usr/include `ls -dr /usr/include/qt*` `ls -dr /usr/lib/qt*/include` `ls -dr /usr/local/qt*/include` `ls -dr /opt/qt*/include` `ls -dr /Developer/qt*/include`
-    QT_COMMON_LIB_DIRECTORIES=/usr/lib `ls -dr /usr/lib/qt*` `ls -dr /usr/local/qt*/lib` `ls -dr /opt/qt*/lib` `ls -dr/Developer/qt*/lib`
+
+    QT_COMMON_INCLUDE_DIRECTORIES="/usr/include
+      `ls -dr ${QTDIR}/include         2>/dev/null`
+      `ls -dr /usr/include/qt*         2>/dev/null`
+      `ls -dr /usr/lib/qt*/include     2>/dev/null`
+      `ls -dr /usr/local/qt*/include   2>/dev/null`
+      `ls -dr /opt/qt*/include         2>/dev/null`
+      `ls -dr /Developer/qt*/include   2>/dev/null`
+    "
+
+    QT_COMMON_LIB_DIRECTORIES=""
 
     CACHED_CPPFLAG=${CPPFLAGS}
@@ -107,4 +116,8 @@
     if [test "x$_lib_check" = "xyes"] ; then
          QT_LIBS="${QT_LIBS} -l$_found_lib"
+         AX_CHECK_REQUIRED_LIB([QtCore QtCore4], [main],,,[http://www.trolltech.com] )
+         AX_CHECK_REQUIRED_LIB([QtGui QtGui4], [main],,,[http://www.trolltech.com] )
+#         AX_CHECK_REQUIRED_LIB([QtOpenGL QtOpenGL4],,,[http://www.trolltech.com] )
+
          $3
     else
@@ -116,4 +129,9 @@
          exit -1
     fi
+
+    echo "QT_LIBS = ${QT_LIBS}"
+    echo "QT_CXXFLAGS = ${QT_CXXFLAGS}"
+    echo "QT_LD_FLAGS = ${QT_LDFLAGS}"
+
     AC_SUBST([QT_LIBS])
     AC_SUBST([QT_CXXFLAGS])
Index: /branches/qt_gui/configure.ac
===================================================================
--- /branches/qt_gui/configure.ac	(revision 7533)
+++ /branches/qt_gui/configure.ac	(revision 7534)
@@ -236,14 +236,8 @@
 
   ## QT
-  QT_PREFIX=/usr/pack/qt-3.3.3-mo
-  CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/${ARCH}/include"
-  LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/${ARCH}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib"
-  QT_BIN_DIR="${PREFIX_QT}/${ARCH}/bin"
-
-
-
-  QT_PREFIX=/usr/pack/qt-3.3.3-mo
-  QTDIR="${QT_PREFIX}/${ARCH}"
-  LDFLAGS="${LDFLAGS} -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib"
+  QT_PREFIX=/usr/pack/qt-4.1.1-mo/${ARCH}
+#  CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/include"
+#  LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib"
+
 
 
@@ -579,12 +573,7 @@
 # QT #
 #----#
-AX_CHECK_QT([${QTDIR}], [qt-mt],, [http://www.trolltech.com])
+AX_CHECK_QT([${QT_PREFIX}], [QtCore],, [http://www.trolltech.com])
 if test x$have_qt = xno ; then
     WITH_QT=no
-##else
-#  AX_CHECK_REQUIRED_LIB([QtCore QtCore4], [main],,,[http://www.trolltech.com] )
-#  AX_CHECK_REQUIRED_LIB([QtGui QtGui4], [main],,,[http://www.trolltech.com] )
-#  AX_CHECK_REQUIRED_LIB([QtOpenGL QtOpenGL4], [main],,,[http://www.trolltech.com] )
-
 fi
 
Index: /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc	(revision 7534)
@@ -27,11 +27,11 @@
 #include "gui_audio.h"
 
-#include <qlayout.h>
+#include <QtGui/QLayout>
 #include "sdlincl.h"
 #include "debug.h"
 
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <QtGui/QPushButton>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
 
 namespace OrxGui
@@ -46,12 +46,12 @@
 
     {
-      QCheckBox* fullscreen = new QCheckBox(QString("Enabled"), this);
+      QCheckBox* fullscreen = new QCheckBox(QString("Enabled"));
       //fullscreen->setName();
       layout->addWidget(fullscreen, 0, 0);
 
-      QCheckBox* wireframe = new QCheckBox("Test", this);
+      QCheckBox* wireframe = new QCheckBox("Test");
       layout->addWidget(wireframe, 1, 0);
 
-      QComboBox* resolution = new QComboBox("SecondTest", this);
+      QComboBox* resolution = new QComboBox();
       layout->addWidget(resolution, 2, 0);
 
Index: /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.h
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.h	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/gui_audio.h	(revision 7534)
@@ -9,5 +9,5 @@
 #include <vector>
 #include <string>
-#include <qgroupbox.h>
+#include <QtGui/QGroupBox>
 
 namespace OrxGui
Index: /branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc	(revision 7534)
@@ -27,11 +27,12 @@
 #include "gui_video.h"
 
-#include <qlayout.h>
+#include <QtGui/QLayout>
 #include "sdlincl.h"
 #include "debug.h"
 
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+
+#include <QtGui/QPushButton>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
 
 namespace OrxGui
@@ -54,10 +55,10 @@
 
       {
-        QComboBox* resolution = new QComboBox("Resolution", this);
+        QComboBox* resolution = new QComboBox();
         layout->addWidget(resolution, 2, 0);
         std::vector<QString> resolutions;
         this->getResolutions(resolutions);
         for (unsigned int i = 0; i < resolutions.size(); ++i)
-          resolution->insertItem(resolutions[i]);
+          resolution->addItem(resolutions[i]);
       }
 
@@ -148,5 +149,5 @@
           PRINTF(5)("  %d x %d\n", modes[i]->w, modes[i]->h);
           sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h);
-          resolutionList.push_back(std::string(tmpChar));
+          resolutionList.push_back(QString(tmpChar));
           x = modes[i]->w; y = modes[i]->h;
         }
Index: /branches/qt_gui/src/lib/gui/qt_gui/gui_video.h
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/gui_video.h	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/gui_video.h	(revision 7534)
@@ -9,5 +9,5 @@
 #include <vector>
 #include <string>
-#include <qgroupbox.h>
+#include <QtGui/QGroupBox>
 
 namespace OrxGui
Index: /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc	(revision 7534)
@@ -18,11 +18,8 @@
 #include "qt_gui.h"
 
-#include <qapplication.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qtoolbox.h>
+#include <QtGui/QApplication>
+#include <QtGui/QToolBox>
+#include <QtGui/QGridLayout>
 
-#include <qpushbutton.h>
-#include <qcombobox.h>
 
 #include "gui_video.h"
Index: /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.h
===================================================================
--- /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.h	(revision 7533)
+++ /branches/qt_gui/src/lib/gui/qt_gui/qt_gui.h	(revision 7534)
@@ -9,6 +9,6 @@
 #include "../gui.h"
 #include "../gui_element.h"
-#include <qapplication.h>
-#include <qmainwindow.h>
+#include <QtGui/QApplication>
+#include <QtGui/QMainWindow>
 
 namespace OrxGui
