Important: Please read the Qt Code of Conduct -

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;
        QTextTable *table = cursor.insertTable(5, 5, format);

    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