Customizing splitter handle..
-
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.
-
Hi
Did you try with other widget than splitter?If understand you correctly you use the same
splitter controlling the ListViews and QFileSystemModel as CornerWidgetIm not sure that can work at all but i never tested it :)
-
Hi and welcome to devnet,
Shouldn't you rather hide the scrollbar and keep your widgets in the vertical QSplitter without touching the handle ?
-
If understand you correctly you use the same
splitter controlling the ListViews and QFileSystemModel as CornerWidgetThanks 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.
-
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.
-
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 .
-
@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.
-
What version of macOS are you using ? With Sierra at least and I think already before, there are no such corner widgets showing.
-
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.
-
@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