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. Drag&Drop in QScrollArea
Forum Updated to NodeBB v4.3 + New Features

Drag&Drop in QScrollArea

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.6k 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.
  • S Offline
    S Offline
    slavko1001
    wrote on last edited by
    #1

    Hi everyone,

    I'm stack with this. I'm trying to combine this two things. After I drop QLabel item and do a scrolling, position of the dropped item is fix in window.

    mrjjM 1 Reply Last reply
    0
    • S slavko1001

      Hi everyone,

      I'm stack with this. I'm trying to combine this two things. After I drop QLabel item and do a scrolling, position of the dropped item is fix in window.

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

      @slavko1001
      Hi
      Can you show the code u have so far ?
      And explain what part is not working.
      If you drag an item to scroll box, and make sure its inserted into the layout it should be as expected so
      im not sure what effect/function your are after.

      "item is fix in window."

      Meaning its not scrolling with the QScrollArea ?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        slavko1001
        wrote on last edited by slavko1001
        #3

        Hi mrjj,
        Currently I'm not near my PC, but I uploaded pictures http://imgur.com/a/CLBnk. Maybe this help to understand what I aiming for. On third picture you can see that Table 1 stay on same position in window even if I scroll to right.

        mrjjM 1 Reply Last reply
        0
        • S slavko1001

          Hi mrjj,
          Currently I'm not near my PC, but I uploaded pictures http://imgur.com/a/CLBnk. Maybe this help to understand what I aiming for. On third picture you can see that Table 1 stay on same position in window even if I scroll to right.

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

          @slavko1001
          ahh, yes its super with pictures.
          It seems when you drag it, its not insert into the layout/scroll area again so
          check the Parent before and after dragging.

          I would guess on something like that.

          1 Reply Last reply
          1
          • S Offline
            S Offline
            slavko1001
            wrote on last edited by
            #5

            @mrjj
            I'm guessing the same. May be I choose wrong layout. I'm working with QGridLayout. Which layout fit best for drag&drop function with QScrollArea?

            mrjjM 1 Reply Last reply
            0
            • S slavko1001

              @mrjj
              I'm guessing the same. May be I choose wrong layout. I'm working with QGridLayout. Which layout fit best for drag&drop function with QScrollArea?

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

              @slavko1001
              Depends on the effect you want.
              Some layouts would insert in end. But QGridLayout should also work fine since
              the other do scroll.

              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