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
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
Post a Comment