I'm trying to programm an qt application, and my design is the following. I need a menubar, toolbar, statusbar and the central widget. In the central widget i need to change among some custom widgets. Till now i have not problem. But when i programm my custom widget and try to put in the centralwidget, my customwidget not resize. Now i'm testing with a simple custom widget that contains 3 textboxes:
Code:
splitter
= new QSplitter (Qt
::Horizontal,
this);
splitter->addWidget(editor1);
splitter->addWidget(editor2);
splitter->addWidget(editor3);
and in the mainwindows i programm something like this:
Code:
CreateToolBars();
CreateStatusBar();
setCentralWidget(w);
TextEditor = new WindowsTextEditor(); //--->this is my custom widget
vbox->addWidget(TextEditor);
w->setLayout(vbox);
This paint the toolbar, menubar, statusbar and in the central widget puts a little box....
I have tryed to give size to my widget, like this:
Code:
TextEditor = new WindowsTextEditor(800,800);
and in my custom:
Code:
this->setGeometry(0,0,width,height);
...
But do the same, a little textbox....:confused:
Someone knows what's happening?
Thanks