PDA

View Full Version : How to use QGenericMatrix for dynamic rows and columns?



lni
28th August 2011, 05:35
Hi,

I need to create a matrix whose rows and columns are computed dynamically, so I need to create a matrix such as


int rows = calcRows();
int cols = calcCols();
QGenericMatrix<cols, rows, qreal> matrix;

But this will not compile because rows/cols are not constant. Is there a way to work around?

Thanks!

wysota
28th August 2011, 06:36
Not using QGenericMatrix class.