title: Initializing QVector of QImages
body: <p>I am fairly new to Qt. It is the first framework I have worked with. I am writing a blackjack game using Qt. It seems to me that I should store the images of each card in a container class such as <code>QVector</code>. The container type would be of <code>QImage</code>. So I would have a declaration such as <code>QVector&lt;QImage&gt; cards;</code> Perhaps this is not the best way about approaching this problem so any alternative suggestion is of course welcomed. However, regardless, I would like to know if it is possible to initialize the container during the declaration. I have not been able to solve this so my solution is the following: </p>
  
  <pre><code>// Deck.h
  class Deck
  {
  public:
  
      Deck();
      void shuffle();    // Creates new deck and shuffles it.
      QImage &amp;popCard(); // Removes first card off deck.
  
  private:
  
      void emptyDeck(); // Empty the deck so new cards can be added
  
      QVector&lt;QImage&gt; cards;
      QQueue&lt;QImage&gt; deck;
  };
  
  // Deck.cpp
  Deck::Deck()
  {
      cards.push_back(QImage(":/PlayingCards/Clubs 1.png"));
      cards.push_back(QImage(":/PlayingCards/Clubs 2.png"));
      cards.push_back(QImage(":/PlayingCards/Clubs 3.png"));
      cards.push_back(QImage(":/PlayingCards/Clubs 4.png"));
      // continue process for entire deck of cards...
  }
  </code></pre>
  
  <p>This seems to be painfully tedious especially if I consider adding a different style of playing cards later on, or if I give the user an option to change the style of the cards at run time. What would be an efficient design to this? </p>