title: Qt GUI design programmatically
body: <p>I'm try to create a GUI application. </p>
  
  <p>The main window, a <code>QMainWindow</code>, contains 9 labels with fixed size and also the size of the main window. </p>
  
  <p>I tried to make it programmatically without Qt GUI Designer. The project is built without error but I cannot see any label nor layout shown on the main window. it's just blank. </p>
  
  <p>Here is my source code: </p>
  
  <pre><code>WCwindow::WCwindow()
  {
     // initialize widgets with text
     CAM111 = new QLabel("CAM 01");
     CAM121 = new QLabel("CAM 02");
     CAM131 = new QLabel("CAM 03");
  
     CAM211 = new QLabel("CAM 04");
     CAM221 = new QLabel("CAM 05");
     CAM231 = new QLabel("CAM 06");
  
     CAM311 = new QLabel("CAM 07");
     CAM321 = new QLabel("CAM 08");
     CAM331 = new QLabel("CAM 09");
  
     CAM111-&gt;setFixedSize(wcW,wcH);
     CAM121-&gt;setFixedSize(wcW,wcH);
     CAM131-&gt;setFixedSize(wcW,wcH);
     CAM211-&gt;setFixedSize(wcW,wcH);
     CAM221-&gt;setFixedSize(wcW,wcH);
     CAM231-&gt;setFixedSize(wcW,wcH);
     CAM311-&gt;setFixedSize(wcW,wcH);
     CAM321-&gt;setFixedSize(wcW,wcH);
     CAM331-&gt;setFixedSize(wcW,wcH);
  
     QGridLayout *layout = new QGridLayout;
     layout-&gt;addWidget(CAM111,0,0);
     layout-&gt;addWidget(CAM121,0,1);
     layout-&gt;addWidget(CAM131,0,2);
  
     layout-&gt;addWidget(CAM211,1,0);
     layout-&gt;addWidget(CAM221,1,1);
     layout-&gt;addWidget(CAM231,1,2);
  
     layout-&gt;addWidget(CAM311,2,0);
     layout-&gt;addWidget(CAM321,2,1);
     layout-&gt;addWidget(CAM331,2,2);
  
     setLayout(layout);
  
     setWindowTitle("Camera Window");
     setFixedSize(1000, 800);
  
  }
  </code></pre>
  
  <p>of course, the class is initialized and evoked in main.cpp:</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
  
      WCwindow *WCwin = new WCwindow;
  
      WCwin-&gt;show();
  
      return app.exec();
  }
  </code></pre>
  
  <p>what kind of bug am I having??</p>