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::iconMode Infopanel

QListView::iconMode Infopanel

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 808 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.
  • N Offline
    N Offline
    Neko
    wrote on last edited by
    #1

    Hey guys,
    i have created and filled a QListView with IconMode Settings.

    What i need now is an infopanel next to a selected icon.
    Here an example:

    0_1531736635515_fbbb2c4f-59e1-48e4-a626-23e8b5705864-image.png

    It's fine for me if it overlaps the other icons.
    Is there any way to do it ? If yes, how can i achieve this ?

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

      Hi
      Why not just use a QListView in list mode next to the
      QListView in icon mode ?

      1 Reply Last reply
      3
      • N Offline
        N Offline
        Neko
        wrote on last edited by
        #3

        My goal was to have the InfoBox right next to the selected icon.

        Else i would simply create a non-modal dialog and show this above everything.

        mrjjM 1 Reply Last reply
        0
        • N Neko

          My goal was to have the InfoBox right next to the selected icon.

          Else i would simply create a non-modal dialog and show this above everything.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Neko
          Ok then you need a floating window.
          Like you suggest, a non modal dialog.

          Since you show info with scrollbar, i assume using tooltip is not enough.

          1 Reply Last reply
          3
          • N Offline
            N Offline
            Neko
            wrote on last edited by
            #5

            Okay, is there a way to get the position of my clicked icon and position the non modal dialog right next to it (on the right side)?

            mrjjM 1 Reply Last reply
            0
            • N Neko

              Okay, is there a way to get the position of my clicked icon and position the non modal dialog right next to it (on the right side)?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              Hi
              yes there is visualRect()
              http://doc.qt.io/qt-5/qabstractitemview.html#visualRect

              1 Reply Last reply
              1
              • N Offline
                N Offline
                Neko
                wrote on last edited by
                #7

                Thanks, i'll try it

                mrjjM 1 Reply Last reply
                0
                • N Neko

                  Thanks, i'll try it

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Neko
                  Just as note.
                  the rect might be in local coordinates so you might need to use
                  the mapTo function to translate the x,y to world coordinates to position a dialog,

                  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