How to set window size?
-
I created a QTableView, when I press the button and open this table, it appears as a small box. How can I adjust the size of my window?
QTableView *view = new QTableView; view->setFont(fnt); view ->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); -
I created a QTableView, when I press the button and open this table, it appears as a small box. How can I adjust the size of my window?
QTableView *view = new QTableView; view->setFont(fnt); view ->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);@TheCeylann said in How to set window size?:
How can I adjust the size of my window?
- use layouts
- see QWidget::resize()
-
I created a QTableView, when I press the button and open this table, it appears as a small box. How can I adjust the size of my window?
QTableView *view = new QTableView; view->setFont(fnt); view ->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);@TheCeylann
Set a minimum size to the tableView.Or better: save and restore the table geometry in QSettings the user wants.