Forum
Sign Up
× DataGrid for Qt.C++

Bug Report About DataGrid

1 week 5 days ago - 1 week 5 days ago #1 by yimin
Hello Sir,
I used QtitanDataGrid6.4.0 and tested GRID_MDIApplication project in examples.
first error:
If I didn't add any row in model before grid been created, the Grid will generate debug error when I add a new row.
Screen capture in attachment
second error:
The new rows added in the way you' ve provided cann't be displayed immediately.
                GridTableView* view = grid->view<Qtitan::GridTableView>();
		//int count = view->model()->rowCount();
		bool b = view->model()->insertRow(0);
		GridRow row = view->modelController()->getGridRowByModelRow(0);
		view->scrollToRow(row);
Attachments:
Last edit: 1 week 5 days ago by yimin.

Please Log in or Create an account to join the conversation.

More
1 week 5 days ago #2 by Developer Machines
Could you attach a full call stack of the crash? Did you rebuild the component for Qt5.13 or do you use the compiled binaries from the installation?

Please Log in or Create an account to join the conversation.

More
1 week 5 days ago #3 by yimin
Replied by yimin on topic Bug Report About DataGrid
Hello sir,

My develpment envirment is :
QT 5.13.2 64 msvc2015_64
vs 2015
rebuild every library with x64

The attachments are screen shot of call stack and my test project.
Attachments:

Please Log in or Create an account to join the conversation.

More
1 week 5 days ago - 1 week 5 days ago #4 by Developer Machines
In this example we use a simplified version of the model - CustomDataModel, that works in readonly mode only. So you see an q_assert on adding a new item to it.

For your testing i'd suggest to try "MSOfficeMode" example that is operates with QStandardItemModel:

www.devmachines.com/documentation/Qtitan...icemode-example.html

In this example please change the printPreview() routine with this code, run it and press Print Preview button several times.
void Window::printPreview()
{
    GridTableView* view = m_grid->view<Qtitan::GridTableView>();
#if 0
    int row = 0;
    view->model()->insertRow(row);
    GridRow gridRow = view->modelController()->getGridRowByModelRow(row);
    view->scrollToRow(gridRow);
#else
    addMail(view->model(), "Happy New Year!", "Grace K. <grace@software-inc.com>",
        QDateTime(QDate(2015, 12, 31), QTime(17, 03)), false, true, 0);
#endif
}

You will see how an emails will be adding at the beginning of the table.
Last edit: 1 week 5 days ago by Developer Machines.
The following user(s) said Thank You: yimin

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #5 by yimin
Replied by yimin on topic Bug Report About DataGrid
Yes, it works. Thank you very much.

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer MachinesEduard
Time to create page: 0.146 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )