Thank you wysota,
if you say
I can't think of any possible reason to want to stretch corners, anyway...
maybe I don't cope with the problem in the correct way.
I have an image (handle.jpg) applied to the handle of the scrollbar. With StyleSheet I set the handle's minimum size and it works correctly.
When the scrollbar grows, the handle image is stretched but the final effect is awful (see the second image).
my stylesheet code is
background:lightgray;\
border-color:black;\
border-style:solid;\
width: 50px;\
margin-top:1px;\
margin-bottom:1px;\
}\
\
border-image: url(handle.png);\
min-height: 96px; \
} \
\
background:none;\
border-width:0px;\
height: 0px;\
width: 0px; \
} \
\
background:none;\
border-width:0px;\
height: 0px;\
width: 0px; \
} \
\
background: none;\
}\
\
background: none;\
}
QScrollBar::vertical {\
background:lightgray;\
border-color:black;\
border-style:solid;\
width: 50px;\
margin-top:1px;\
margin-bottom:1px;\
}\
\
QScrollBar::handle:vertical,\
QScrollBar::handle:pressed{\
border-image: url(handle.png);\
min-height: 96px; \
} \
\
QScrollBar::add-line:vertical{\
background:none;\
border-width:0px;\
height: 0px;\
width: 0px; \
} \
\
QScrollBar::sub-line:vertical { \
background:none;\
border-width:0px;\
height: 0px;\
width: 0px; \
} \
\
QScrollBar::add-page:vertical, \
QScrollBar::sub-page:vertical {\
background: none;\
}\
\
QScrollBar::add-line:pressed,\
QScrollBar::sub-line:pressed {\
background: none;\
}
To copy to clipboard, switch view to plain text mode
Thanks
Beppe
Bookmarks