I have a simple QmainWindow and I want it to get open in full screen mode, just like any other program in my computer (Firefox, IE, etc...)
How?
I have a simple QmainWindow and I want it to get open in full screen mode, just like any other program in my computer (Firefox, IE, etc...)
How?
J-P Nurmi
Actually I solve that... the problem I have now is that a QTextBRowser is inside the QMainWindow, but I cannot show the QTextBRowser in the full window.
How to I make, so the QTextBroser will occupy the whole Main Window?
As it says in the QWidget::showFullScreen() docs:
You would have to reparent the text browser as a top level widget for the time you want it to be shown full screen.Calling this function only affects windows.
J-P Nurmi
I don't want the text browser to be full screen, I just want it to occupy as much as the main window as possible.
So what's the problem? The text browser will get automatically resized if it's set directly as the central widget or if it's in a layout. You can optionally hide toolbars, status bar and such when in full screen mode if you want to. If the text browser is in a layout, you can also reduce the amount of margins to zero.
J-P Nurmi
Server::Server()
{
setFont(QFont("Verdana", 11));
showMaximized();
textBrowser = new QTextBrowser(this);
textBrowser->show();
show();
}
That code shows the QTextBrowser, but it is only a small square (5"x5") in the screen. While the main window is full screen.
The text browser should be as big as possible.
What is wrong ?
Set the text browser as main window's central widget: QMainWindow::setCentralWidget().
J-P Nurmi
Bookmarks