Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Selecting Item and Scrolling ListWidget Area Problem
Forum Updated to NodeBB v4.3 + New Features

Selecting Item and Scrolling ListWidget Area Problem

Scheduled Pinned Locked Moved Mobile and Embedded
12 Posts 3 Posters 4.0k Views 1 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.
  • T Offline
    T Offline
    t3685
    wrote on 28 Apr 2014, 15:07 last edited by
    #3

    Hi,

    For more readability use the "@""@" tag for your code.

    As for you problem, have you tried this:

    http://qt-project.org/doc/qt-5/qabstractitemview.html#selectionMode-prop

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anticore
      wrote on 28 Apr 2014, 17:06 last edited by
      #4

      Hi,

      I have tried all of the modes, however it is not the solution or I could not.

      Thank you.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 28 Apr 2014, 19:40 last edited by
        #5

        Hi and welcome to devnet,

        Have a look at setSelectionMode and ExtendedSelection

        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
        • A Offline
          A Offline
          anticore
          wrote on 29 Apr 2014, 06:58 last edited by
          #6

          Thank you sGaist,

          I tried ExtendedSelection, but I need select only one item. I want to highlight only first pressed item if cursor on it until I release mouse button.
          In other words, If I press mouse button on an item, I don't want hover effect on other items.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 29 Apr 2014, 08:52 last edited by
            #7

            What you are trying to do looks like the drag and drop functionality but without actually doing anything. It doesn't fit in any usual use case of that widget.

            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
            • A Offline
              A Offline
              anticore
              wrote on 29 Apr 2014, 13:41 last edited by
              #8

              Yes, exactly.

              Do you have any suggestion to do such a functionalty?

              I see it on IOS apps, if Kinetic Scrolling not used.

              On Android apps it is different. If you press on an item, app highlight that item, However if you move the cursor (or your finger on touch screens) without relesing, that item can not be selected again.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 30 Apr 2014, 19:53 last edited by
                #9

                You would probably need to customize the mouse event handling by subclassing QListWidget

                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
                • A Offline
                  A Offline
                  anticore
                  wrote on 2 May 2014, 10:29 last edited by
                  #10

                  Yes.

                  Should I do this with code handling or a QListWidget method?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 2 May 2014, 19:36 last edited by
                    #11

                    Have a look at the mouseXXXEvent methods

                    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
                    • A Offline
                      A Offline
                      anticore
                      wrote on 5 May 2014, 11:45 last edited by
                      #12

                      Ok,

                      Thank you for your help...

                      1 Reply Last reply
                      0

                      12/12

                      5 May 2014, 11:45

                      • Login

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