setMaximunSize(?,?)
Solved
General and Desktop
-
The following function executes the program according to the set size(960x640).
setMinimumSize(960, 640);
When I first run the program, I want to set the browser to full screen size. How can I do this?
setMaximunSize(?,?) -
What browser?!
You can show any window widget in fullscreen mode using
widget->showFullScreen();
or try
widget->showMaximized();
for maximum size window widget.
Note: Both might not work on all platforms/window managers.
-
This post is deleted!
-
@Pl45m4
Thanks :)
I solve it.WpubEditor::WpubEditor(QWidget *parent) : QMainWindow(parent) , ui(new Ui::WpubEditor) , styleSheet() , mainLayout(nullptr) , vBoxLayout(nullptr) , buttonLayout(nullptr) , btnWrapper(nullptr) , stackedLayout(nullptr) , buttonLabel(nullptr) , m_pPubManager(nullptr) , webView(nullptr) , channel(nullptr) { //setMinimumSize(960, 640); ui->setupUi(this); webView = new QWebEngineView(this); // QWebEngineView 객체 초기화 setCentralWidget(webView); QString htmlPath = QFileInfo(__FILE__).dir().absolutePath() + "/main.html"; QFile file(htmlPath); if (file.exists()) { webView->load(QUrl::fromLocalFile(htmlPath)); } else { qDebug() << "Failed to load canvas.html. File not found."; } channel = new QWebChannel(webView->page()); webView->page()->setWebChannel(channel); channel->registerObject("wpubEditor", this); createStatusBar(); initResources(); showMaximized(); }
-