Which means you are not referencing that QList<> variable *anywhere else* in your MainWindow code, right? Otherwise, the code wouldn't compile in the first place.if i put the QList declaration in a comment, it works.
By any chance did you mistakenly add the line
Qt Code:
QList<ParameterLevel> TabList;To copy to clipboard, switch view to plain text mode
somewhere in your MainWindow constructor (thus declaring a variable *local* to the scope of the constructor that hides the member variable of the same name)? If so, then your member variable remains unchanged, and if you try to access something from it, you get a segmentation fault and a crash.
Please teach yourself the meanings of "compiling", "linking", and "executing" code. If code doesn't compile, you have no compiled objects and nothing to link. If compiled objects don't link, then you have nothing to execute. Only once you get a correctly compiled and linked executable do you have something to run (and possibly crash).
Bookmarks