Export a Qt table model to a CSV file.
More...
#include <csvmodelwriter.h>
Export a Qt table model to a CSV file.
This is useful for analyzing or post-processing the data in a spreadsheet.
Definition at line 18 of file csvmodelwriter.h.
CSVModelWriter::CSVModelWriter |
( |
const QString & |
filename, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
void CSVModelWriter::addColumn |
( |
const QString & |
title, |
|
|
int |
column, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
void CSVModelWriter::setModel |
( |
const QAbstractItemModel * |
model | ) |
|
bool CSVModelWriter::write |
( |
| ) |
|
Perform export of the model to CSV.
- Returns
- true on success, false otherwise
Definition at line 49 of file csvmodelwriter.cpp.
QList<Column> CSVModelWriter::columns |
|
private |
QString CSVModelWriter::filename |
|
private |
const QAbstractItemModel* CSVModelWriter::model |
|
private |
The documentation for this class was generated from the following files: