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. Preventing user interaction with a widget

Preventing user interaction with a widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 209 Views
  • 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    I think the problem I reported in Key press (arrow keys) cause loss of focus may be because when the selected row of the table view changes to a row that refers to an image that is not currently loaded I am disabling the table view and starting a long running operation to load the image. On completion I re-enable the table view and call setFocus().

    This doesn't seem to cause a big problem if the dock widget which hosts the table view is docked (not clear why), but if it is undocked, then attempting to restore the focus to the table view doesn't restore the selected item ...

    If there a way to block user input to a widget (in this case the table view) without actually disabling the control?

    SGaistS 1 Reply Last reply
    0
    • PerdrixP Perdrix

      I think the problem I reported in Key press (arrow keys) cause loss of focus may be because when the selected row of the table view changes to a row that refers to an image that is not currently loaded I am disabling the table view and starting a long running operation to load the image. On completion I re-enable the table view and call setFocus().

      This doesn't seem to cause a big problem if the dock widget which hosts the table view is docked (not clear why), but if it is undocked, then attempting to restore the focus to the table view doesn't restore the selected item ...

      If there a way to block user input to a widget (in this case the table view) without actually disabling the control?

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can use an event filter however it might be surprising to your users that nothing happens when they try to interact with your widgets.

      Another solution might be to have a modal dialogue that states there's something going on.

      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
      1

      • Login

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