Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: QTreeWidget and SpinBox  (Read 48 times)


  • Newbie
  • *
  • Posts: 2
    • View Profile
QTreeWidget and SpinBox
« on: January 07, 2019, 02:20:52 am »
Hi!!, sorry for this question that is newbie, recently i'm learning this Report generator and is amazing.

I have a QTreeWidget with a QDoubleSpinBox inside

In this topic topic i did learn how to send data from Widget to the report, I can send all, except the last field (SpinBox)

I did try with a casting sending value of SpinBox to a QAbstractItemModel

Code: [Select]
    LimeReport::ReportEngine *Ticket =new LimeReport::ReportEngine(this);
    QAbstractItemModel *ModCant;

But in data manager I get only this (with red circle) and I cannot view any data

How can send data from QDoubleSpinBox to the report??

Thanks and sorry for my bad english!!

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 615
    • View Profile
Re: QTreeWidget and SpinBox
« Reply #1 on: January 07, 2019, 07:09:26 pm »
Thanks and sorry for my bad english!!
I am not native speaker too :) If we can understand each other in my opinion this is enough :)
As i can see the field "Candidad" is present in the model that you sent to limereport.
As i guess you don't see the value of this field, isn't it?
I think the problem in your delegate item that represent field value as spinbox in the treewidget.
Possible it does not sending the value to the treewidget model.


  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: QTreeWidget and SpinBox
« Reply #2 on: January 12, 2019, 02:17:13 am »
Thanks, I can't sent value, SpinBox haven't model property and QTreeWidgetItem value (QSpinBox delegate) is in blank, only QSpinBox save the value but cannot send to report.

I did create another QTreeWidget and did copy all values to this, including SpinBox value, and sent this to LimeReport.

If there are a better way to do this I will be grateful.

Best regards.
« Last Edit: January 12, 2019, 02:19:53 am by JAVH »