Someone told me there is no proper way to do what I want to do, so I guess just tell me what you would do.

Here is a sample of my code from my .cpp file
Qt Code:
  1. card_Estate = new QToolButton();
  2. card_Estate->setCheckable(true);
  3. card_Estate->setText("Estate");
  4. card_Estate->setToolTip("<img src=':/Cards/Estate.jpg' width='250'>");
  5. ui->verticalLayout_Disabled->addWidget(card_Estate);
  6. connect(card_Estate, SIGNAL(clicked(bool)), this, SLOT(SLOTcard_Estate(bool)));
To copy to clipboard, switch view to plain text mode 

Now I need to duplicate this code 200 times. The only difference in each duplication is that the word "Estate" is replaced by another word, and that other word corresponds to the name of a file found in a folder or resource file: "<img src=':/Cards/Estate.jpg' width='250'>" , <img src=':/Cards/Copper.jpg' width='250'>, <img src=':/Cards/Dutchy.jpg' width='250'>,
etc~


Thanks for any ideas.

edit:
Oh, and I forgot to ask; is this same sort of thing possible with the header file as well, or is it best in that case to just manually declare 200 buttons?