Forum
Sign Up
× DataGrid for Qt.C++

Assertion while invoking context menu

12 years 5 months ago #1 by Pascal
Whenever I click the right mouse button in the grid on a row, I get below assertion:
-
ASSERT: "m_viewUpdateCount > 0" in file ..\..\grid\QtnGridTableView.cpp, line 8912
-

After ignoring the assertion I get the context menu and program continues as if nothing happened.

When I click below the rows, in the blank area of the grid, I get the context menu without assertions.

I'm using QtitanGrid 2.11 with MSVC2010.

I have it consistently in all my grids. All my Grid initializations look like:
-
ui->grid->setViewType(Qtitan::Grid::TableView);
Qtitan::GridTableView *view = ui->grid->view<Qtitan::GridTableView>();
view->setModel(pMyModel);
view->modelController()->setCacheUsage(Qtitan::NoCache);

// Set grid options
view->options().setSelectionPolicy(Qtitan::SelectSingleRow);
view->options().setFastScrollEffect(true);
view->options().setWindowsAirSupported(true);
view->options().setCellHeight(19);
view->options().setCellFont(QFont("Segoe UI",9));

// Set column options
Qtitan::GridTableColumn* column;
view->getColumnByModelColumn(ContactTableModel::id)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::name)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::enterprisename)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::municipality)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::country)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::function)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::sex)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::fax)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
view->getColumnByModelColumn(ContactTableModel::eidCardNo)->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
-

Cannot find the reason why this is happening.

Any ideas ?

Pascal.

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

More
12 years 4 months ago #2 by Developer Machines
This error was fixed and fix will be available in next release. I apologize for the inconvenience.

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.129 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:

  • support@devmachines.com

  • license@devmachines.com

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:

  • support@devmachines.com( any questions related to our products or services )
  • license@devmachines.com( questions related to licensing )