Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to edit QtableWidget?

    General and Desktop
    3
    3
    1124
    Loading More Posts
    • 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
      freelife last edited by

      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 Reply Quote 0
      • C
        Code_ReaQtor last edited by

        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 Reply Quote 0
        • CAD_coding
          CAD_coding last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post