QT ScrollArea - Modifying clickable area
-
I need some help / advice with scrollable areas in QT designer 5.
For some background I did not know python, nor have access to any backend code for the widgets. I only have access to the UI file that Designer generates and of course the style sheets for the code.
I'm using QT Scrollarea which contains a QT grid Layout. The scrollbar works, everything is good so far. However I need to modify this so that everything thing that is in the scrollable area can be clicked on to scroll its contents, and not just the scroll bar. (kind of like swiping on your mobile, how you can scroll by clicking and pressing anywheres on your screen) I'm not sure of the right terms, sorry. Coding is not my expertise, but I've been trying to find a way to make this work.
I tried increasing the width of the vertical scrollbar with the plan to set the scrollbar opacity to 0 and overlay it above the grid contents, however I cannot get the scrollbar to overlay on top of the grid layout, it keeps adding the horizontal scrollbar and scaling the contents based on the width of the vertical bar. (even if i try disabling the horizontal scrollbar)
I've been trying different css strings to change the positioning but it doesn't do anything.I tried setting up a signal/slot in QT designer with a vertical scroll bar and linking it to a 2nd scrollbar so that when one is pressed the other follows. One would be visible the other hidden essentally for this plan. It worked with the individual qt vertical scrollbars but not with the scrollarea. The scrollarea does not have the same inputs in the signal/slot. (sliderMovedInt.)
I tried removing the scrollarea and linking a widget or frame (tried both) into a vertical scrollbar and then add the grid layout, but it never works. The scrollbar does not appear to control the contents.
Im running out of ideas.
If anyone has any suggestions, it would be very much appreciated. Maybe I'm making this more complicated than it needs to be, lol -
I need some help / advice with scrollable areas in QT designer 5.
For some background I did not know python, nor have access to any backend code for the widgets. I only have access to the UI file that Designer generates and of course the style sheets for the code.
I'm using QT Scrollarea which contains a QT grid Layout. The scrollbar works, everything is good so far. However I need to modify this so that everything thing that is in the scrollable area can be clicked on to scroll its contents, and not just the scroll bar. (kind of like swiping on your mobile, how you can scroll by clicking and pressing anywheres on your screen) I'm not sure of the right terms, sorry. Coding is not my expertise, but I've been trying to find a way to make this work.
I tried increasing the width of the vertical scrollbar with the plan to set the scrollbar opacity to 0 and overlay it above the grid contents, however I cannot get the scrollbar to overlay on top of the grid layout, it keeps adding the horizontal scrollbar and scaling the contents based on the width of the vertical bar. (even if i try disabling the horizontal scrollbar)
I've been trying different css strings to change the positioning but it doesn't do anything.I tried setting up a signal/slot in QT designer with a vertical scroll bar and linking it to a 2nd scrollbar so that when one is pressed the other follows. One would be visible the other hidden essentally for this plan. It worked with the individual qt vertical scrollbars but not with the scrollarea. The scrollarea does not have the same inputs in the signal/slot. (sliderMovedInt.)
I tried removing the scrollarea and linking a widget or frame (tried both) into a vertical scrollbar and then add the grid layout, but it never works. The scrollbar does not appear to control the contents.
Im running out of ideas.
If anyone has any suggestions, it would be very much appreciated. Maybe I'm making this more complicated than it needs to be, lolWith your QtDesigner only, it's impossible. You need to make some changes in your code.
QtDesigner and the "default" signals & slots, that can be used directly in design mode, are very limited. Some things just can't be done.That seems to be it: