Having problem with showing the forms Of a Qvector Members
-
I have A class Named "Student" !
I have a Q Vector From Student class
Now I want To show the form of the 2nd Student in my vector !
but when it shows It is empty , it doesn't show things the thing in the Ui
What should I do ?! Douse it even can happen ?!?! Or it is not possible in Qt
This is My Code :@{
///////Sign in things !
int index = StudentSearch(User);
Student* at = StHead->data();
if (at[index].GetPass() == Pass)
emit Hide_StuLog();
at[index].show();
}@ -
Its difficult to see how you are using the QVector from you code snippet!
You would have something like:@
// QVector of pointers to "student"s
QVector<student *> studentVect;// Add to your list (in a very noddy/example way):
student s1;
student s2;
studentVect.append(&s1);
studentVect.append(&s2);// Now read them back:
for (index = 0; index++; index < studentVect.size())
{
studentVect.at(index).show();
// or
studentVect[index].show();
}
@