Results 1 to 8 of 8

Thread: How to clear the GridLayout

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    21
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Default Re: How to clear the GridLayout

    hello wysota

    how can i interact with each buttons that i have used in creating my custom
    calender means i want to say suppose i click one button than it will give
    all the information of that buttons ie in which month,which week ie
    sun,mon,tue..etc is shown in textBrowser.

    i have tried to done one thing..

    Qt Code:
    1. for(int i=0;i<6;i++)
    2. {
    3. for(int j=0;j<7;j++)
    4. {
    5. cellBut[i][j]=new QPushButton;
    6. connect(cellBut[i][j],SIGNAL(clicked()),this,SLOT(showDialog()));
    7. }
    8. }
    9. void MainWindow::showDialog()
    10. {
    11. txtDateDisplay->setText("Hello");
    12. }
    To copy to clipboard, switch view to plain text mode 

    now here on each button click i simply set a text hello in the txtDateDisplay..now if i want that on each button click i set the text that appear on button in txtDateDisplay than how should i do it..because here i cant pass arguments in SIGNAL(Clicked()) function..

    regards
    Rahul
    Last edited by wysota; 13th May 2011 at 09:23.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to clear the GridLayout


Similar Threads

  1. Widget layout in GridLayout
    By Dato0011 in forum Qt Programming
    Replies: 8
    Last Post: 7th December 2009, 09:26
  2. QMdiArea with Gridlayout
    By ericV in forum Qt Programming
    Replies: 0
    Last Post: 14th September 2009, 11:26
  3. How to drop space in GridLayout ?
    By jackm in forum Qt Tools
    Replies: 2
    Last Post: 3rd October 2008, 03:06
  4. Adding item to GridLayout???
    By Kapil in forum Newbie
    Replies: 23
    Last Post: 7th April 2006, 11:26
  5. does gridlayout really lay out?
    By illuzioner in forum Newbie
    Replies: 2
    Last Post: 26th February 2006, 00:57

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
  •  
Qt is a trademark of The Qt Company.