Results 1 to 2 of 2

Thread: QTableWidget

  1. #1
    Join Date
    Oct 2006
    Posts
    11
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidget

    Hi, I'm trying to verify whether a QTableWidget is empty or partially empty, I want to assert that all cells of the table are filled out... before proceeding, how can I do this.. These are my silly attempts:

    1st attempt
    Qt Code:
    1. if (table->itemAt(1,i)->text().isEmpty())
    2. {
    3. resultLabel->setText(QString("Please fill the table completely\n") +
    4. return false;
    5. }
    To copy to clipboard, switch view to plain text mode 

    2nd attempt
    Qt Code:
    1. if (!table->cellChanged(0,i))
    2. {
    3. resultLabel->setText(QString("Please fill the table completely\n") +
    4. return false;
    5. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by e8johan; 12th November 2006 at 10:24. Reason: missing [code] tags

  2. #2
    Join Date
    Nov 2006
    Location
    Almaty, Kazakhstan
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget

    try

    Qt Code:
    1. if (table->itemAt(1,i)->data(0).toString().isEmpty())
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. print QTableWidget
    By chak_med in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 18:46
  2. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 18:46
  3. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 21:09
  4. Replies: 6
    Last Post: 5th March 2006, 21:05
  5. How to obtain the width of a QTableWidget?
    By Giel Peters in forum Qt Programming
    Replies: 3
    Last Post: 9th January 2006, 22:34

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.