Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Drag&Drop in QScrollArea

    General and Desktop
    2
    6
    1234
    Loading More Posts
    • 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
      slavko1001 last edited by

      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.

      mrjj 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion @slavko1001 last edited by

        @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 Reply Quote 0
        • S
          slavko1001 last edited by 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.

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @slavko1001 last edited by

            @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 Reply Quote 1
            • S
              slavko1001 last edited by

              @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?

              mrjj 1 Reply Last reply Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion @slavko1001 last edited by

                @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 Reply Quote 0
                • First post
                  Last post