Forum
Sign Up
× DataGrid for Qt.C++

Deselect Grid Items

1 year 6 months ago #1 by GYEYOUNG TNI CO LTD
After selecting an item in the Grid, I want to deselect it by clicking in the space where there is no item.

Like Windows Explorer.

p.s I want to add a certain amount of space between each row, and of course, I need to be able to set that space with CSS.

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

More
1 year 5 months ago #2 by GYEYOUNG TNI CO LTD
hm... hello?? anybody?? very long reply periods....

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

More
2 weeks 4 hours ago #3 by PolywickStudio
Replied by PolywickStudio on topic Deselect Grid Items
you would need to add an event filter
grid->installEventFilter(this);

in event filter
bool class::eventFilter(QObject *obj, QEvent *event)
{
// if grid selected position at mouse cursor is empty then
grid->ClearSelection();
}

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