Forum
Sign Up
× DataGrid for Qt.C++

double click event not received on focused row

1 year 3 months ago #1 by GYEYOUNG TNI
i set
column->editorRepository()->setEditorActivationPolicy( (GridEditor::ActivationPolicy)( GridEditor::ActivateByClickFocused | GridEditor::ActivateByKeyPress_F2 ) );

and

1. click any row. then this item is focused.
2. double click that row! but start editing cell,
i want to receive double click event.

ps. spView->options().setKeepFocusedRow( false ); , focus/selection is not initialized by beginResetModel / endResetModel. It doesn't just appear on the UI rendering, internally it still appears as a focusedrow. I want you to fix it.

ps. please, please, quickly answer...

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

More
1 year 3 months ago #2 by GYEYOUNG TNI
knock, knock. hello?

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

More
1 year 3 months ago #3 by Developer Machines
You get start editing on dbl-click because you have GridEditor::ActivateByClickFocused policy enabled. The first click activate the cell editing. On the second click you will have event via rowDblClicked(RowClickEventArgs*) signal:
Qtitan::GridTableView* view = m_grid->view<Qtitan::GridTableView>();
connect(view, SIGNAL(rowDblClicked(RowClickEventArgs*)), this, SLOT(rowDblClicked(RowClickEventArgs*)));

void Window::rowDblClicked(RowClickEventArgs* args)
{
}

>>spView->options().setKeepFocusedRow( false ); ,

Is it possible to send us a small example that demonstrates the issue?

>>ps. please, please, quickly answer...

In order to get a response faster, please duplicate the request to This email address is being protected from spambots. You need JavaScript enabled to view it.. In the request please specify your license number, component version, Qt version, environment.

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

More
1 year 3 months ago #4 by GYEYOUNG TNI
Then, ActivateByClickFocused includes dbl click events, ActivateByDblClickFocused is only dbl click???

there is no only single click event ?

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

More
1 year 3 months ago - 1 year 3 months ago #5 by Developer Machines
This is specific to the double click event. The first click is always there and therefore if the flag ActivateByClickFocused is set, then there will be a start of editing. But if you remove this flag, but leave ActivateByDblClickFocused, then the start of editing will be activated on the second click only.

By the way, you may need to do some additional action by double-clicking. In this case, I'd suggest adding an additional button into the cell, by which you can execute additional actions:
    Qtitan::GridBandedTableColumn* column = (Qtitan::GridBandedTableColumn *)view->getColumnByModelColumnName(tr("Photo"));
    column->addButton(GridColumn::ClearButtonIcon, Qtitan::AtEnd, Qtitan::GridColumn::FixedPolicy, tr("Text here"));
    connect(column, SIGNAL(buttonClicked(CellButtonClickEventArgs*)), this, SLOT(cellButtonClicked(CellButtonClickEventArgs*)));
Last edit: 1 year 3 months ago by Developer Machines.

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

More
1 year 2 months ago #6 by GYEYOUNG TNI
What I want is simple. It works just like Windows Explorer.

1. The first click is select and focus.

After that, it is divided into:

2. Single click starts editing (change file name)

3. Double-click to run or navigate inside a folder

However, there is a problem that the 2) is executed during the current double-click and the double-click event does not come.

In other words, what I want is a precise distinction between ActivateByClickFocused and ActivateByDblClickFocused clicks.

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.207 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 )