Hello all,
what's going wrong here:
I'm reading in a list of integers from QSettings and that means doing some juggling with QList<QVariant>, no problem but I get a crash on leaving the function.
Qt Code:
  1. QList<QVariant> widths;
  2. //fill the QList with some default value
  3. for(int col=0; col<tableWidget->columnCount(); ++col){
  4. widths << 80;//some standard width
  5. }
  6. //read a QVariant from QSettings and convert it to a QList<QVariant>
  7. widths = settings.value("column widths").toList();
  8. //or with a default value
  9. widths = settings.value("column widths", QVariant(widths)).toList();
  10. //then I use the widths variable and get a crash on leaving the function
To copy to clipboard, switch view to plain text mode 

thanks
K