QXlsx icon indicating copy to clipboard operation
QXlsx copied to clipboard

After exiting main, the program crashes

Open skyzhou95 opened this issue 1 year ago • 0 comments

image image

int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);
    Document xlsxR("Test.xlsx");
    if ( xlsxR.load() ) // load excel file
    {
        int row = 1; int col = 1;
        Cell* cell = xlsxR.cellAt(row, col); // get cell pointer.
        QVariant var = cell->readValue(); // read cell value (number(double), QDateTime, QString ...)
        qDebug() << "[debug] cell(1,1) is " << var; // Display value. It is 'Hello Qt!'.
    }

    return 0;
}

image

Are there compatibility issues and requirements on the QT version or compiler version?

skyzhou95 avatar Jul 20 '22 03:07 skyzhou95