Results 1 to 4 of 4

Thread: complete tablewidget

  1. #1
    Join Date
    Mar 2010
    Location
    ~/
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default complete tablewidget

    I create an object with tableWidget have. I take information from the database and the inside of the display. Also able to create the new column. How to access row columns was?






    ____________________________
    debian forums

  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: complete tablewidget

    Are you able to show data in your tablewidget ? If yes I guess you are using QTableWidgetItem.
    You can access that item through QTableWidget::item

  3. #3
    Join Date
    Mar 2010
    Location
    ~/
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: complete tablewidget

    How to access the rows and columns have data in it do instead? For example, the first row and first column and the second and third

  4. #4
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: complete tablewidget

    to acess data
    Qt Code:
    1. tableWidget.item(line, row)
    To copy to clipboard, switch view to plain text mode 

    to set data
    Qt Code:
    1. tableWidget.item(line, row)->setText("some text");
    To copy to clipboard, switch view to plain text mode 
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Complete newbie with programming and Qt
    By Jacob in forum Newbie
    Replies: 1
    Last Post: 6th March 2010, 06:26
  2. Update complete notification?
    By dingetje in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2009, 11:07
  3. Tableview complete sizehint
    By skuda in forum Qt Programming
    Replies: 0
    Last Post: 5th March 2009, 10:33

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.