PDA

View Full Version : Layout setting



anshumanBorah
13th April 2011, 08:34
hello sir

i am new to QT..actually i contructed a calenderWidget in qt using coding not by using qtdesginer...now my problem is that i can't manage the widget to properly display in stimulator...means i cant able to manage layout by using cooding..

centralWidget=new QWidget();
calenderWidget=new QCalendarWidget();
calenderWidget->setGridVisible(true);
calenderWidget->show();



QHBoxLayout *hLayout=new QHBoxLayout();
hLayout->addWidget(calenderWidget);

hLayout->addSpacing(24);
hLayout->addStretch(1);;

centralWidget->setLayout(hLayout);
setCentralWidget(centralWidget);

so can u post me a code so that i can layout the widget without using qtdesigner..

thanks

mcosta
13th April 2011, 11:59
now my problem is that i can't manage the widget to properly display in stimulator...means i cant able to manage layout by using cooding..


What does it means?
Can you post a screenshot of your MainWindow?