Make cells have equal size in a QTextTable?



  • I've managed to create a table in QTextEdit using this code

    qDebug() << "insering";
        QTextCursor cursor = note->textCursor();
    
        QTextTableFormat format;
        format.setBorder(1);
        format.setCellPadding(10);
        format.setCellSpacing(0);
    
        QTextTable *table = cursor.insertTable(5, 5, format);
        Q_UNUSED(table);
    

    The issue I am having is that the table is kind of stretched out because the cells height is greater than the cells width. Is there a way to change the default height and width of cells in a QTextTable?



  • Update
    Usingformat.setWidth(10);or doing format.setHeight(1000); has no effect on the cells visible height and width