Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListView and ContextMenu - Problem
Qt 6.11 is out! See what's new in the release blog

QListView and ContextMenu - Problem

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 891 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I implemented a context menu in my ListView . The ListView allows multiple selection and everything seems to work properly.

    The problem is that when opening the ContextMenu when I have selected several items , de- select all other selected items.

    If I hold down the CTRL key works properly.

    Some idea about the problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, it's not a problem. Having ctrl press tells your view that it's in multiple selection mode. If you release that key then you go back into single selection mode so when you click on one item (with either left or right mouse button), the selection would be cleared.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved