PDA

View Full Version : how we convert no' of pointer objects into a single array



sudheer
4th April 2008, 09:56
i had design form(in designer) in which i have used about 20 QCheck Boxes, and when i qmake the file it generates individual pointer objects ( like *checkbox1,*checkbox2................*checkbox20 ) so it becomes difficult to me access individual checkboxes.

is there any chance to club all those objects into a single array (like checkbox[20] ) so that i can access easily

stevey
14th April 2008, 01:59
I did something similar in VB years ago.
Even with it's ease of designing forms, it couldn't do it. How can a designer know what you want an array of them?

I'm pretty sure you'll need to do that sort of stuff manually in your subclass just after the setupUi call.

Michiel
16th April 2008, 10:31
Designer can't do it. You have to either write your form in code, or subclass your form and put the pointers in an array after they are created.

(Although I seem to remember that VB was able to. Granted, that was many years ago.)