diff options
Diffstat (limited to 'tests/QtTests/server.cpp')
-rw-r--r-- | tests/QtTests/server.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/QtTests/server.cpp b/tests/QtTests/server.cpp index 7c7817eb715..6552506e4b8 100644 --- a/tests/QtTests/server.cpp +++ b/tests/QtTests/server.cpp @@ -3,16 +3,14 @@ #include "test_i.h" #include "ace/Get_Opt.h" -ACE_RCSID (QtTests, server, "$Id$") - // who defines index macro? #ifdef index #undef index #endif #include "tao/QtResource/QtResource_Loader.h" -#include <qlcdnumber.h> -#include <qvbox.h> -#include <qslider.h> +#include <QtGui/qlcdnumber.h> +#include <QtGui/qboxlayout.h> +#include <QtGui/qslider.h> #include "ace/OS_NS_stdio.h" @@ -42,7 +40,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) // argv [0]), // -1); } - // Indicates sucessful parsing of the command line + // Indicates successful parsing of the command line return 0; } @@ -89,10 +87,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) LCD_Display::_narrow (object.in ()); // Create the LCD after the QVbox is created. - QVBox box; + QWidget mainwindow_; + mainwindow_.resize (145, 100); + mainwindow_.setWindowTitle("QtServer"); - box.resize (145, 100); - QLCDNumber lcd (2, &box, "lcd_display"); + QVBoxLayout *box = new QVBoxLayout(); + QLCDNumber lcd (2); + box->addWidget(&lcd); // Connect the signal from the hosted servant with the public // SLOT method display () for the LCD Widget. @@ -102,8 +103,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) &lcd, SLOT (display (int))); - app.setMainWidget(&box); - box.show (); + mainwindow_.setLayout(box); + app.setActiveWindow(&(mainwindow_)); + mainwindow_.show (); // End of QT specific stuff.. |