This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mainwindow.h" | |
#include "ui_mainwindow.h" | |
MainWindow::MainWindow(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::MainWindow) | |
{ | |
ui->setupUi(this); | |
setFixedSize( QSize ( 600, 400 ) ); | |
} | |
MainWindow::~MainWindow() | |
{ | |
delete ui; | |
} |
メインウインドウの中のQWidgetの大きさを変更する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mainwindow.h" | |
#include "ui_mainwindow.h" | |
MainWindow::MainWindow(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::MainWindow) | |
{ | |
ui->setupUi(this); | |
setFixedSize( QSize ( 600, 400 ) ); | |
} | |
MainWindow::~MainWindow() | |
{ | |
delete ui; | |
} |
ウインドウサイズより大きく設定した場合、ウインドウも QWidget に合わせて大きくなる。
ウインドウの中の QWidget は resize() では、変更できなかった。
0 件のコメント:
コメントを投稿