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 should connect QTableview using QtRPT design tool in qt creator (ubuntu 16.04 LTS) 64 bit
Qt 6.11 is out! See what's new in the release blog

how should connect QTableview using QtRPT design tool in qt creator (ubuntu 16.04 LTS) 64 bit

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 2.5k Views 1 Watching
  • 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.
  • V Offline
    V Offline
    veera
    wrote on last edited by
    #1

    Hi All,
    I am trying to use the TableView for my qt application which is connecting with MSSQL server and i have design the page using QtRPT design tool ....now i am trying to write code for below is code in this code they have used tablewidget ,instead of tablewidget need to use the TableView plz guide me ......

    QtRPT *report = new QtRPT(this);
    QString ID,Name,Lastname,contact,EmailId;
    // report->recordCount.append(ui->tableView->rowCount());
    report->recordCount.append(ui->tableView->verticalHeader()->count());
    // connect(report,&QtRPT::setValue,[&](const int recNo,const QString paramName,QVariant &paramValue,const int reportPage)
    connect(report,&QtRPT::setValue,[&](const int recNo, const QString paramName, QVariant &paramValue, const int reportPage){
    if(paramName == "ID")
    {
    //paramValue = ui->tableView->itemDelegateForRow(recNo,ID);
    paramValue = ui->tableView->item(recNo,ID);

        }
        if(paramName == "Name")
        {
            paramValue = ui->tableView->item(recNo,Name)
        }
        if(paramName == "Lastname")
        {
            paramValue = ui->tableView->item(recNo,Lastname)
        }
        if(paramName == "contact" )
        {
            paramValue = ui->tableView->item(recNo,contact)
        }
        if(paramName == "EmailId")
        {
            paramValue = ui->tableView->item(recNo,EmailId)
    
        }
    
    
    });
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QtRPT is not an official module from the Qt project. You should also try to contact the authors of that library on their forum.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        veera
        wrote on last edited by
        #3

        okay ....thanks for the information....@SGaist

        1 Reply Last reply
        0
        • V Offline
          V Offline
          veera
          wrote on last edited by
          #4

          Hi ,
          I have successfully connected QtRPT with Tableview finally......

          N 1 Reply Last reply
          0
          • V veera

            Hi ,
            I have successfully connected QtRPT with Tableview finally......

            N Offline
            N Offline
            narenamr09
            wrote on last edited by
            #5

            @veera
            hello verra can you share your information how to connect QtRPT to tableview pleaser

            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