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. resizeable rubber band with QSizeGrip
Forum Updated to NodeBB v4.3 + New Features

resizeable rubber band with QSizeGrip

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 3 Posters 1.4k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Can you provide a minimal compilable example that shows the behaviour you have ? There might be something unrelated to the stack overflow code happening.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    Pl45m4P 1 Reply Last reply
    0
    • P Offline
      P Offline
      pmh4514
      wrote on last edited by
      #3

      Good idea. Of course, putting together a simple empty QMainWindow project with a single QLabel taking on the rubber band functionality, it works as I'd expect it to. Meaning the behavior is due to something elsewhere in my real project.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        That's a good news.

        Then I would disable all widgets that are not related to your rubber band and gradually add them back until things get wrong.

        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
        • P Offline
          P Offline
          pmh4514
          wrote on last edited by
          #5

          Yah I started looking at how I was setting it up and controlling it - the GUI interaction of this particular app positions the rubber band automatically at previously user-defined positions. I was calling setGeometry on it with a QRect whose coordinates were reversed. (interestingly to no visual detriment.) Now that I've changed that, the QSizeGrip handles do function as expected, I can resize up/left just as well as down/right.. The upper left arrow itself is not pointing the correct direction (up/left) but at least now it's behaving as expected.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Then there must be one last glitch hiding.

            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
            • P Offline
              P Offline
              pmh4514
              wrote on last edited by
              #7

              I'll have to dig into the QSizeGrip code to see what determines its orientation

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                There's a method in the private implementation of the class that determines that based on the position of the grip.

                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
                • P Offline
                  P Offline
                  pmh4514
                  wrote on last edited by
                  #9

                  yah I'm seeing that.. Interestingly it's being painted in the correct spot (and now behaving as such) but it's being painted as if it's the lower-right

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Hi,

                    Can you provide a minimal compilable example that shows the behaviour you have ? There might be something unrelated to the stack overflow code happening.

                    Pl45m4P Offline
                    Pl45m4P Offline
                    Pl45m4
                    wrote on last edited by
                    #10

                    @SGaist said in resizeable rubber band with QSizeGrip:

                    Can you provide a minimal compilable example that shows the behaviour you have ?

                    This in Top 3 of "solutions which will fix your Qt problem" 😂😂
                    RubberDuck Debugging ;-)


                    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                    ~E. W. Dijkstra

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      pmh4514
                      wrote on last edited by
                      #11

                      Indeed it is!

                      I'm going to mark this solved. I haven't figured out yet why my TL corner is painting as if LR, but that's beside the point I think.

                      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