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 3 Jan 2023, 16:48 last edited by Proton Phoenix 1 Apr 2023, 04:59
    #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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 4 Jan 2023, 20:25 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 4 Jan 2023, 21:27
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 3 Jan 2023, 19:55 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 3 Jan 2023, 21:24
        1
        • S SGaist
          3 Jan 2023, 19:55

          Hi,

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

          P Offline
          P Offline
          Proton Phoenix
          wrote on 3 Jan 2023, 21:24 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
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Jan 2023, 20:25 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 4 Jan 2023, 21:27
            1
            • S SGaist
              4 Jan 2023, 20:25

              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 4 Jan 2023, 21:27 last edited by
              #5

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

              1 Reply Last reply
              0

              5/5

              4 Jan 2023, 21:27

              • Login

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