I have the following code.
MainWin.h
Code:
#ifndef MAINWIN_H
#define MAINWIN_H
#include <qmainwindow.h>
#include <qtextedit.h>
#include <qdockwindow.h>
class MainWin: public QMainWindow
{
public:
MainWin();
};
#endif
MainWin.cpp
Code:
#include "MainWin.h"
MainWin::MainWin()
{
// QTextEdit* editor = new QTextEdit( this );
// editor->setFocus();
// setCentralWidget( editor );
QDockWindow* dw = new QDockWindow;
dw->setOrientation(Qt::Vertical);
dw->setResizeEnabled(true);
dw->setVerticallyStretchable(false);
dw->setHorizontallyStretchable(true);
dw->setMovingEnabled(false);
addDockWindow( dw );
}
main.cpp
Code:
#include <qapplication.h>
#include "MainWin.h"
int main( int argc, char ** argv ) {
QApplication a( argc, argv );
MainWin * mw = new MainWin();
mw->setCaption( "Install Script Maker" );
mw->show();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
return a.exec();
}
Yet, the bar still shows up horizontal. How do I make it change its orientation to be vertical? The objective is to split the window in half. So I can have a list box on one half and a text editor on the other half.