Forum
Sign Up
× DataGrid for Qt.C++

8.0 bug, clearPersistRows!!!

10 months 3 weeks ago #1 by GYEYOUNG TNI CO LTD
As one of the differences between QTitanDataGrid 8.0 Public Beta and Release versions, the clearPersistRows function is called inside void GridModelController::modelReset(). However, this results in updating the model contents and calling

beginResetModel();
qSwap( VecFilesEx, vecFiles_ );
endResetModel();

calls, and after that, some features don't work.

The features that don't work are mouse click selections and keyboard navigation.

What is the role of the function that caused the problem, and why did you call it at that point?

P.S: Do you test and release before you release, I always get default functionality not working.

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

More
10 months 3 weeks ago #2 by Developer Machines
We cannot comment on the internals of the source code here. To solve the problem, would it be better to add a description of the bug and how it can be reproduced?

calls, and after that, some features don't work.

In general, calling modelReset completely resets the persistence rows configuration, that is, information about selection and the focus row is lost. In fact, we are talking about installing a new model into the grid.

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

More
10 months 3 weeks ago #3 by GYEYOUNG TNI CO LTD
To reiterate,
I call modelReset when I want to refresh the data inside the model. For example, I have a class that inherits from QAbstractItemModel. This class contains the contents of some directory. To refresh the contents of this directory, the data inside , is changed by calling the following code.

beginResetModel();
qSwap( VecFilesEx, vecFiles_ ); c.
endResetModel();
// vecFiles_ is a vector inside the model.
// VecFilesEx is the newly acquired information.

From now on, you won't be able to move items with the keyboard, and you won't be able to select items with a mouse click. However, it is possible to select rows by dragging (when it is a MultiRowSelection).

However, clickEvent, dobuleClick events, etc. will still come in and work as normal.

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

More
10 months 3 weeks ago #4 by Developer Machines
Thank you so much for your bug-report. To fix the issue please replace the line:

GridModelController::modelReset()
{
....
clearPersistRows();

to

for (QSet<GridPersistentRow*>::const_iterator it = m_persistRows.constBegin(); it != m_persistRows.constEnd(); ++it)
(*it)->clear();
....
}

We will add the bugfix into the 8.1.0. I apologize for the any inconvenience caused.

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 Machines
Time to create page: 0.205 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 )