Quote Originally Posted by anda_skoa View Post
Then why does it need the index?


Ok, that is possible with normal QLineEdits as well.


So what does the VB6 line edit object use the index for?
There must be a reason why the line edit object itself needs to know which index it stands for.


A vector is a linear container, like a list or array.
Its elements can be accessed by index.


Of course, you can store arbitrary data in a class, so creating a subclass of QLineEdit that stores an integer is possible.


The first creates an object of class LineEdit and passes "index" to its constructor.

_
That is what I need. I am creating a screen displaying 1650 inventory items. The lineedit is used to enter a quantity for an order. When a lineedit has a number entered, the index is used to access the information in the corresponding labels in that row (using the same index) and passing that to a page where the invoice is displayed and a routine that prints a hard copy. I want to create a LineEdit, assign an index and place it on a form in a loop that will create a grid with all 1650 items.