Results 1 to 3 of 3

Thread: how we convert no' of pointer objects into a single array

  1. #1
    Join Date
    Nov 2007
    Posts
    42
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question how we convert no' of pointer objects into a single array

    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

  2. #2
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how we convert no' of pointer objects into a single array

    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.

  3. #3
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how we convert no' of pointer objects into a single array

    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.)
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

Similar Threads

  1. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.