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. A method for implementing a custom UI.
Qt 6.11 is out! See what's new in the release blog

A method for implementing a custom UI.

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

    ae7f85f5-ae29-4baa-9d59-b8b7e30caf87-image.png

    There is a UI with a list. If you press and hold on to the list item, a check box appears, and you want to delete several items by selecting them. How can I implement this UI? Is there any signal that you can recognize that you are clicking on the list item for a long time?

    J.HilkJ 1 Reply Last reply
    0
    • I IknowQT

      ae7f85f5-ae29-4baa-9d59-b8b7e30caf87-image.png

      There is a UI with a list. If you press and hold on to the list item, a check box appears, and you want to delete several items by selecting them. How can I implement this UI? Is there any signal that you can recognize that you are clicking on the list item for a long time?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @IknowQT I don't think there's an out of the box QWidget hat handles long pressed stuff. You will have to override mousePress and mouseRelease events to measure the time between those two.

      If you're working with QML however, then I think the MouseArea has a tabandhold signal/property that you could listen to.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3

      • Login

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