problem with scope of array??
-
the arrays was created with code on form load
ui->setupUi(this); ... create arrays and add it to general layoutwhen i lauch application and click on pushbutton (slot / event)
don't find the array (added as you see in the gridLayout)
and give me the up-posted error..
can i solve with associated variables? and how i have to do in this case?
-
the arrays was created with code on form load
ui->setupUi(this); ... create arrays and add it to general layoutwhen i lauch application and click on pushbutton (slot / event)
don't find the array (added as you see in the gridLayout)
and give me the up-posted error..
can i solve with associated variables? and how i have to do in this case?
@TheCipo76
Probably then make the array variable be a member of your "form", then it will stay in scope. -
@TheCipo76
Probably then make the array variable be a member of your "form", then it will stay in scope. -
@SGaist said in problem with scope of array??:
Hi,
Best to read about them here.
How come you give him one dense reference to read and it turns out to be just the right one to explain to his satisfaction?!
-
Ok i read the link documentation but i can't do this work..
i think that i have to create a class with QLabelEdit array
so i can manage data in or out the main with no scope problem.
It is correct?
If yes..
i've view some tutorial in order to learn c++ ( i'm coming from VB6)
but this is too complicate for me..anyone can put a example?
-
Ok i read the link documentation but i can't do this work..
i think that i have to create a class with QLabelEdit array
so i can manage data in or out the main with no scope problem.
It is correct?
If yes..
i've view some tutorial in order to learn c++ ( i'm coming from VB6)
but this is too complicate for me..anyone can put a example?
@TheCipo76 Simply put these arrays as member variables of your form class, there is no need for an extra class just for these arrays.
class regtemciclo: public... { ... private: QLineEdit *array_Fine15[5]; ... } -
@TheCipo76 Simply put these arrays as member variables of your form class, there is no need for an extra class just for these arrays.
class regtemciclo: public... { ... private: QLineEdit *array_Fine15[5]; ... }