Hi,
I have created a new widget and called it MyWidget (it includes some qcomboboxes and some qlabels); then I have created a QList like this:

Qt Code:
  1. QList<QWidget *> myList;
To copy to clipboard, switch view to plain text mode 

and appended 2 myWidget:

Qt Code:
  1. myWidget_1 = new MyWidget;
  2. myWidget_2 = new MyWidget;
  3. myList.append(myWidget_1);
  4. myList.append(myWidget_2);
To copy to clipboard, switch view to plain text mode 

Now, how can i access a combobox in one of myWidget? The following code gives error during compilation (error: ‘class QWidget’ has no member named ‘comboBox’):

Qt Code:
  1. int index = myList.at(0)->comboBox->currentIndex();
To copy to clipboard, switch view to plain text mode 


Regards