Results 1 to 3 of 3

Thread: Reference QTableWidgetItem

  1. #1
    Join Date
    Jan 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Reference QTableWidgetItem

    Hi,

    can someone help me how to reference the QTableWidgetItem in the following example, because i need to change it's color.

    for (i = 0; i < 42; i++)
    {
    .....
    monthTable->setItem( i/7, i%7, new QTableWidgetItem(QString::number(c++)));
    ......
    }

    Thank you very much,
    regenbiegen

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reference QTableWidgetItem

    you can access the item in a tablewidget by the function -

    QTableWidgetItem * QTableWidget::item ( int row, int column ) const

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reference QTableWidgetItem

    Hello,

    thanks for your help. Thats what i was looking for.

    Have a nice day,
    regenbiegen

Similar Threads

  1. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15
  2. Strange error while using Q3Canvas
    By Kapil in forum Newbie
    Replies: 13
    Last Post: 15th June 2006, 19:36
  3. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52
  4. undefined reference to fftw libraries
    By kmyadam in forum General Programming
    Replies: 2
    Last Post: 9th March 2006, 01:01
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.