set QTableWidget's row width?



  • does anybody know how to set the QTableWidget's row width?

    I see there is setColumnWidth() and setRowHeight() but that's not what I need.
    my text is being clipped by the row and I need to increase it to make it look better.

    
    MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
        ui->statusBar->setSizeGripEnabled(false);
    
        ui->toolBar->setIconSize(QSize(16, 16));
    
        ui->listWidgetStrings->setFocusPolicy(Qt::NoFocus);
        for (int i=0; i<ui->tableWidget->rowCount(); i++)
            ui->tableWidget->setRowWidth(i, 32); //<- setRowWidth is not a function or method
    
       // ui->comboBox_Cycle->setItemDelegate(QAbstractItemDelegate);
        //ui->dockWidgetMain->setTitleBarWidget(new QFrame());
        //ui->tabWidget->setTabEnabled(0, false);
        //ui->tab_4->hide();
        //ui->tab_3->hide();
    
    }
    


  • @Shadowblitz16

    sid you try these

    horizontalHeaderDefaultSectionSize
    verticalHeaderDefaultSectionSize
    

    Also check resize().



  • no I will though thankyou.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.