Results 1 to 2 of 2

Thread: Array of button for creating custom calender

  1. #1
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt3
    Platforms
    Symbian S60

    Default Array of button for creating custom calender

    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:


    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include "mainwindow.h"
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication a(argc, argv);
    7. MainWindow w;
    8. QPushButton *button[10][10];
    9. int count=1,i,j;
    10. for(i=0;i<7;i++){
    11. for(j=0;j<6;j++)
    12. {
    13. button[i][j] = new QPushButton(QString::number(count),&w);
    14. button[i][j]->resize(40,40);
    15. button[i][j]->move(40*i, 40*j);
    16. button[i][j]->show();
    17. count++;
    18. }
    19.  
    20. }
    21. #if defined(Q_WS_S60)
    22. w.showMaximized();
    23. #else
    24. w.show();
    To copy to clipboard, switch view to plain text mode 
    Last edited by high_flyer; 12th April 2011 at 12:53. Reason: code tags

  2. #2
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Array of button for creating custom calender

    What exactly is your question?

Similar Threads

  1. Creating Custom Ellipse Button
    By VireX in forum Qt Programming
    Replies: 18
    Last Post: 30th May 2012, 11:23
  2. Calender
    By anshumanBorah in forum General Programming
    Replies: 18
    Last Post: 14th April 2011, 10:08
  3. Custom widget: a button within a button
    By Gnurou in forum Qt Programming
    Replies: 7
    Last Post: 18th June 2009, 09:03
  4. Creating a Pixmap out of an array of data
    By toratora in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2007, 19:00
  5. Creating a global array in my code???
    By therealjag in forum General Programming
    Replies: 5
    Last Post: 13th March 2006, 11:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.