It seems that if I declare
Qt Code:
To copy to clipboard, switch view to plain text mode
all works.
Which is the difference?
It seems that if I declare
Qt Code:
To copy to clipboard, switch view to plain text mode
all works.
Which is the difference?
Outch, this happens when only a part of the code is posted. But what I do not understand is why your code compiles at all.
You do a
in your constuctor? Don't know, this part is missing. However, your *model is a local variable, which has absolutely nothing to do with the model in updateDetails(...). Wonder what 'model' the compiler finds in updateDetails(...) at all. Or you have a model pointer as member variable. However, this is not the one you initialize in your constructor.Qt Code:
To copy to clipboard, switch view to plain text mode
because you have a class member variable model and it was not initilazed.
in constructor you create a variable with the same name
Qt Code:
... ...To copy to clipboard, switch view to plain text mode
and when you try to access to methods in a model (it is still isn't initilazed) you get seg fault, because model variable has wrong pointer.
Solved.Thank you.
In fact, in the header I defined
That was the error.
step by step I am going to get accustomed to C++.
Bye
Bookmarks