Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to edit QtableWidget?

How to edit QtableWidget?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    freelife
    wrote on last edited by
    #1

    How I can put QString text in place(int height int width) of QTtableWidget.
    For example I want put "Hello world" in (1,1) in my QTableWidget object.
    I tried it
    @this->tableWidget->setItem(1,1,QString("Hello"));@
    and got an error

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Code_ReaQtor
      wrote on last edited by
      #2

      The third parameter of "QTableWidget::setItem()":http://qt-project.org/doc/qt-4.8/qtablewidget.html#setItem is NOT QString, it should be "QTableWidgetItem":http://qt-project.org/doc/qt-4.8/qtablewidgetitem.html

      Please visit my open-source projects at https://github.com/Code-ReaQtor.

      1 Reply Last reply
      0
      • CAD_codingC Offline
        CAD_codingC Offline
        CAD_coding
        wrote on last edited by
        #3

        See my question over here:
        http://qt-project.org/forums/viewthread/26334/

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved