Well, i'm newbie in Qt and i have a problem.
I have a QListWidget in my UI with 7 items, just 4 items are showed and the other are showed after to use scrollbar. I want to show a arrow image above and below QListWidet than will show than there are more items to scroll.
Ok, i can to see if a item is hidden, but just if it is hidden by setHidden() function. And when is it hidden by scroll? Can i see this in run time? Because the item is there, but scroll is hiding it, right?
I searched some post about this here, but i did not find. Sorry my english, maybe be confused, but if someone to can help me...
Thanks a lot!
So Here is basic example on how to do it. First here is the listing of the MainWindow class implementation:
{
}
As you can see from the code I have set the scroll bar policy to Qt::ScrollBarAsNeeded. By doing that we can take advantage of the fact that we can now react on show/hide events from the scrollbar. And here is reimplementation of the QScrollBar:
Now you can connect the showTip(bool) signal from the ScrollBar to the slot that draws the image.