Hi -

I am upgrading our qt-based application to qt4 from qt3. The application has a main window and then dynamically loadable modules (as widgets).

I want the module windows to be floating windows inside of the main application window, however I can't seem to get this to work that way.

I can only get them either take up the entire main window space (as shown in shot1.png) or be floating, individual windows that are separate from the main window (they can be dragged outside the main application window and don't get closed when then main window closes).

For both cases (shot1.png and shot2.png), my widget constructor has the following:

Qt Code:
  1. DataRecorder::Panel::Panel(QWidget *parent, size_t buffersize) :
  2. QWidget(parent), RT::Thread(RT::Thread::MinimumPriority), fifo(buffersize), recording(false) {
  3.  
  4. setAttribute(Qt::WA_DeleteOnClose);
To copy to clipboard, switch view to plain text mode 

In shot1.png, I have the following in my main_window.cpp file:

Qt Code:
  1. MainWindow::MainWindow (void) : QMainWindow(NULL, Qt::Window) {
  2.  
  3. QWidget *centralWidget = new QWidget(this);
  4. setCentralWidget(centralWidget);
  5.  
  6. setCentralWidget(new QWorkspace(this));
  7. ((QWorkspace *)centralWidget)->setScrollBarsEnabled(true);
To copy to clipboard, switch view to plain text mode 

and in shot2.png I have that commented out.

Any help is appreciated

shot1.jpgshot2.jpg