Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Having problem with showing the forms Of a Qvector Members
Forum Updated to NodeBB v4.3 + New Features

Having problem with showing the forms Of a Qvector Members

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 864 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mehdi42
    wrote on last edited by
    #1

    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();
    }@

    1 Reply Last reply
    0
    • C Offline
      C Offline
      code_fodder
      wrote on last edited by
      #2

      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();
      }
      @

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved