c++ - Using Qt To Build A Full Screen Layout -


i trying use qt along qt designer create simple full screen webview line edit , button above create simple browser.

the problem layout doesn't want expand fill of available space. seem think missing simple, can't seem figure out.

here overview of layout

<mainwindow>     <gridview>         <vboxlayout>             <hboxlayout>                             <lineedit /><pushbutton />              </hboxlayout>             <webview />         </vboxlayout>     </gridview> </mainwindow> 

here code on mainwindow class

mainwindow::mainwindow(qwidget *parent) : qmainwindow(parent), ui(new ui::mainwindow) {      ui->setupui(this);     ui->lineedit->showfullscreen();     ui->pushbutton->showfullscreen();      ui->webview->load(qurl("http://google.com"));      ui->webview->showfullscreen();   } 

and here main code

int main(int argc, char *argv[]) {     qapplication a(argc, argv);     mainwindow w;     w.showmaximized();     return a.exec(); } 

it comes out looking instead of webview , lineedit filling whole amount of space enter image description here

is there anyway of doing in qt, have assumed standard thing want do.

many in advance!

i think have replace gridview vboxlayout directly above. grid view use ?

<mainwindow>     <vboxlayout>         <hboxlayout>                         <lineedit /><pushbutton />          </hboxlayout>         <webview />     </vboxlayout> </mainwindow> 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -