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. QTableWidget Model (CellWidget) And LimeReport problem
Forum Updated to NodeBB v4.3 + New Features

QTableWidget Model (CellWidget) And LimeReport problem

Scheduled Pinned Locked Moved Solved General and Desktop
qtablewidgetlimereportmodel
5 Posts 2 Posters 714 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.
  • P Offline
    P Offline
    Proton Phoenix
    wrote on last edited by Proton Phoenix
    #1

    Hi All ,
    I Have A problem With LimeReport Cannot Read Cell Widgets data inside QTableWidget Model
    is There Any way Casting this data , so Limereport can read it ?
    i mean some Columns Are Spinbox , And QTextEdit ~~^^

    QDoubleSpinBox *spinbox=new QDoubleSpinBox(ui->tableWidget);
            ui->tableWidget->setCellWidget( ui->tableWidget->rowCount() - 1, 2, spinbox );
    
    LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this);
    auto model=ui->tableWidget->model();
    report->dataManager()->addModel("tablemodel",model,false);
    
    

    it shows cell widget columns empty ...

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      That's your issue.

      Use delegates if you need custom editors but don't use cell widgets like that. They are not meant to be used like you do.

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

      P 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Do you mean you have filed your QTableWidget with cell widgets ?

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

        P 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi,

          Do you mean you have filed your QTableWidget with cell widgets ?

          P Offline
          P Offline
          Proton Phoenix
          wrote on last edited by
          #3

          @SGaist said in QTableWidget Model (Custom Widget) And LimeReport problem:

          Do you mean you have filed your QTableWidget with cell widgets ?

          @SGaist
          Yes bro

          QDoubleSpinBox *spinbox=new QDoubleSpinBox(ui->tableWidget);
                   ui->tableWidget->setCellWidget( ui->tableWidget->rowCount() - 1, 2, spinbox );
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            That's your issue.

            Use delegates if you need custom editors but don't use cell widgets like that. They are not meant to be used like you do.

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

            P 1 Reply Last reply
            1
            • SGaistS SGaist

              That's your issue.

              Use delegates if you need custom editors but don't use cell widgets like that. They are not meant to be used like you do.

              P Offline
              P Offline
              Proton Phoenix
              wrote on last edited by
              #5

              @SGaist
              That's What i want bro Really Thank you <3

              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