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. Navigate QListWidget
Forum Updated to NodeBB v4.3 + New Features

Navigate QListWidget

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 3 Posters 2.2k 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.
  • D Offline
    D Offline
    DivyaMuthyala
    wrote on last edited by
    #1

    *Hi,

    I am trying to navigate two listwidgets by using arrow keys, but iam unable to do it.
    Please give a solution to navigate by using arrow keys.

    Thanks in advance.*

    M jsulmJ 2 Replies Last reply
    0
    • D DivyaMuthyala

      *Hi,

      I am trying to navigate two listwidgets by using arrow keys, but iam unable to do it.
      Please give a solution to navigate by using arrow keys.

      Thanks in advance.*

      M Offline
      M Offline
      MaruthiMarsh
      wrote on last edited by
      #2

      @DivyaMuthyala Handle keyPressEvent() and set Current ListWidget item using *setCurrentItem(QListWidgetItem ) or setCurrentRow(int row) of QListWidget ...

      1 Reply Last reply
      0
      • D DivyaMuthyala

        *Hi,

        I am trying to navigate two listwidgets by using arrow keys, but iam unable to do it.
        Please give a solution to navigate by using arrow keys.

        Thanks in advance.*

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @DivyaMuthyala Isn't it already supported by QListWidget? Or do I misunderstand you?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DivyaMuthyala
          wrote on last edited by
          #4

          Hi,

          Actually My requirement is that I have add two listwidgets in one widget,and i had to navigate both listwidgets items by using arrow keys keys,and I should emit using tab key

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DivyaMuthyala
            wrote on last edited by
            #5

            Hi,

            Thanks for replying, my exact need is when i press the down-arrow key three times as you can see in the image the control has to be shifted from top listwidget to bottom listwidget.

            Here is the image link.
            https://s9.postimg.org/r0ylvqlzz/listwidget.png

            jsulmJ 1 Reply Last reply
            0
            • D DivyaMuthyala

              Hi,

              Thanks for replying, my exact need is when i press the down-arrow key three times as you can see in the image the control has to be shifted from top listwidget to bottom listwidget.

              Here is the image link.
              https://s9.postimg.org/r0ylvqlzz/listwidget.png

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @DivyaMuthyala Use http://doc.qt.io/qt-5.8/qlistwidget.html#itemSelectionChanged and check the index of the selected element there, if it is the last one then set focus on the second QListWidget.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • D Offline
                D Offline
                DivyaMuthyala
                wrote on last edited by
                #7

                HI Jsulm,

                Thanks for your advice,Now Iam able to Navigate.
                Now I am adding button to QListwidget as a item, How to select that button text.

                jsulmJ 1 Reply Last reply
                0
                • D DivyaMuthyala

                  HI Jsulm,

                  Thanks for your advice,Now Iam able to Navigate.
                  Now I am adding button to QListwidget as a item, How to select that button text.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @DivyaMuthyala Do you want to select the button or its text? If text then why?

                  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