Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 这问QTableWidget怎么设置自动跟随窗口大小变化?
Forum Updated to NodeBB v4.3 + New Features

这问QTableWidget怎么设置自动跟随窗口大小变化?

Scheduled Pinned Locked Moved Unsolved Chinese
1 Posts 1 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xiaoruby
    wrote on last edited by
    #1
    #include "mainwindow.h"
    #include "QTableWidget"
    
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
    {
        QTableWidget *mytable = new QTableWidget(this);
        mytable->setColumnCount(2);
        mytable->resize(300,100);//这里怎么设置窗口变最大时它跟着变大, 变小时跟着变了?而不是要设置一个固定值 ??
    }
    
    MainWindow::~MainWindow()
    {
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved