Results 1 to 4 of 4

Thread: getting user's data from a QTableWidget

  1. #1
    Join Date
    Nov 2010
    Posts
    142
    Thanks
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default getting user's data from a QTableWidget

    hi,
    I am trying to do something which seems simple but I don't know how to start.

    I have a QTableWidget with 2 columns and 10 rows. The first column has a QComboBox and the second is empty (the user must fill in a number). How can i get the values of the table after the user has finished completing it?

  2. #2
    Join Date
    Nov 2010
    Posts
    142
    Thanks
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: getting user's data from a QTableWidget

    Actually the part I cannot manage is when I have to get the values from the QComboBoxes
    It there a way to get the values of each different QCombobox?!

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: getting user's data from a QTableWidget

    Yes, i answered here

  4. #4
    Join Date
    Nov 2010
    Posts
    142
    Thanks
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: getting user's data from a QTableWidget

    well, I think I am missing something.
    I have used successfully the QComboBox in the past.
    What I don't understand is how to access/get its values when it is in a QTableWidget.
    For example..
    when I use the function item(0,0), the system does not know what type of item exists there.Right?

    I just would like to learn how to get the values of a QComboBox that is located somewhere in a QTableWidget.
    itemText() or itemData() refer to the exclusive usage of QComboBox without being in a QTableWidget.(or I think so)


    Added after 52 minutes:


    continued here
    Last edited by fatecasino; 15th February 2011 at 17:44.

Similar Threads

  1. How to add data into the QTableWidget
    By grsandeep85 in forum Qt Programming
    Replies: 6
    Last Post: 15th November 2013, 03:55
  2. need get data from selected row from QTableWidget?
    By johnibat in forum Qt Programming
    Replies: 15
    Last Post: 16th February 2011, 17:15
  3. QTableWidget - inserting data
    By Tomasz in forum Newbie
    Replies: 1
    Last Post: 29th September 2010, 14:32
  4. attaching user data pointer to images in QTextEdit
    By Workeml in forum Qt Programming
    Replies: 0
    Last Post: 7th November 2008, 20:06
  5. Obtaining data from QTableWidget
    By therealjag in forum Qt Programming
    Replies: 3
    Last Post: 15th March 2006, 07:42

Tags for this Thread

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.