PDA

View Full Version : Array of button for creating custom calender



anshumanBorah
12th April 2011, 12:33
Hello sir

i hv writtrn a code for creating array of button in Qt..now i want to use this array of buttons in developing my custom calender..that means i want to represent each button in place of days..so that i can interact with each of the day in the calender..i hv send my code that i hv use for creating array of buttons..u plz check it n suggest hw can i implement this in creating my custom calender..

thanks

MY CODE:



#include <QtGui/QApplication>
#include "mainwindow.h"

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QPushButton *button[10][10];
int count=1,i,j;
for(i=0;i<7;i++){
for(j=0;j<6;j++)
{
button[i][j] = new QPushButton(QString::number(count),&w);
button[i][j]->resize(40,40);
button[i][j]->move(40*i, 40*j);
button[i][j]->show();
count++;
}

}
#if defined(Q_WS_S60)
w.showMaximized();
#else
w.show();

nightghost
12th April 2011, 13:21
What exactly is your question?