×

Discussion Board

Results 1 to 4 of 4

Thread: Problem

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    5

    Problem

    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();
    #endif

  2. #2
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,355

    Re: Problem

    I don't know how much this will help you, but tried to find one example for you for reference http://doc.trolltech.com/4.7-snapsho...-calendar.html

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    5

    Re: Problem

    thanks for ur suggestion..actually i go through that example..but here they use table in inserting day in each row..but my problem is that i want to insert each day in button..but how??

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Problem

    You win the prize for the month's most descriptive thread title.

    http://doc.qt.nokia.com/4.7/signalsandslots.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×