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. Customizing splitter handle..

Customizing splitter handle..

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 3.5k 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.
  • R Offline
    R Offline
    rtfa
    wrote on last edited by
    #1

    Since I didn't get any response for my post on Stack Overflow, I thought of posting it here, the appropriate community where I can get answers from Qt experts.

    Please let me know if any clarifications required.

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

      Hi
      Did you try with other widget than splitter?

      If understand you correctly you use the same
      splitter controlling the ListViews and QFileSystemModel as CornerWidget

      Im not sure that can work at all but i never tested it :)

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

        Hi and welcome to devnet,

        Shouldn't you rather hide the scrollbar and keep your widgets in the vertical QSplitter without touching the handle ?

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

        R 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          Did you try with other widget than splitter?

          If understand you correctly you use the same
          splitter controlling the ListViews and QFileSystemModel as CornerWidget

          Im not sure that can work at all but i never tested it :)

          R Offline
          R Offline
          rtfa
          wrote on last edited by
          #4

          If understand you correctly you use the same
          splitter controlling the ListViews and QFileSystemModel as CornerWidget

          Thanks for responding. Yes, I'm using splitter to make the list views resizable. As per this doc I can add any number of widgets to be controlled by a splitter. In fact, I'll add more list views dynamically if the folder the user selects has sub-folders/files in it. I just sent a stripped down example for reference.

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            Shouldn't you rather hide the scrollbar and keep your widgets in the vertical QSplitter without touching the handle ?

            R Offline
            R Offline
            rtfa
            wrote on last edited by
            #5

            Shouldn't you rather hide the scrollbar and keep your widgets in the vertical QSplitter without touching the handle ?

            Thank you @SGaist. In the docs it's been suggested to set at least one of the scroll bar modes to AlwaysOn which is why I set the vertical scroll bar to be always visible.

            It's also been said that

            All widgets set here will be deleted by the scroll area when it is destroyed unless you separately reparent the widget after setting some other corner widget (or 0).

            But in my example though the scroll area is still visible, the corner widget disappeared. @mrjj /@SGaist Please let me know if my understanding is wrong.

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

              That's in the case you put something in the corner widget. However in your use case, I don't see why you would do that. There's no corner widgets in Finder, just a series of list widgets if you decide to use the "columns" style .

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

              R 1 Reply Last reply
              0
              • SGaistS SGaist

                That's in the case you put something in the corner widget. However in your use case, I don't see why you would do that. There's no corner widgets in Finder, just a series of list widgets if you decide to use the "columns" style .

                R Offline
                R Offline
                rtfa
                wrote on last edited by rtfa
                #7

                @SGaist In the screenshot I shared, if you look at it closely, you could see two vertical lines at the bottom of the scroll bar between the columns. As we know, on hovering the mouse over there we'll see an icon similar to this <||> and dragging it will resize the columns.

                I wanted my listview to behave in the same manner. The only way in Qt is to set the splitter handle in the corner of two scroll bars. Hope this helps.

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

                  What version of macOS are you using ? With Sierra at least and I think already before, there are no such corner widgets showing.

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

                  R 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    What version of macOS are you using ? With Sierra at least and I think already before, there are no such corner widgets showing.

                    R Offline
                    R Offline
                    rtfa
                    wrote on last edited by
                    #9

                    @SGaist I don't know which versions of Mac has this. But my intention here is to set the resize handle ie., splitter handle at the corner of the scroll area.

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

                      About This Mac, the first entry of the apple menu on the top left.

                      Again, you are going against the macOS standard in a pretty convoluted manner. The splitter handle need its original position to move the content properly which won't be the case anymore if you put it somewhere else.

                      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
                      • R Offline
                        R Offline
                        rtfa
                        wrote on last edited by
                        #11

                        @SGaist I was able to get the view with the help of QColumnView. However I've been facing many issues with QColumnView. Can you please help me resolve these?
                        https://forum.qt.io/topic/76537/hide-remove-preview-widget-from-qcolumnview
                        http://stackoverflow.com/questions/42413766/prevent-loading-column-when-checkstate-alone-gets-changed-qcolumnview

                        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