Hello!
How can I use QScrollArea in QT Creator? I'm putting it on my MainWindow and putting inside it some objects but scroll bars doesn't work when objects are bigger ten scroll area.
thanks in advance
best regards
Tomasz
Hello!
How can I use QScrollArea in QT Creator? I'm putting it on my MainWindow and putting inside it some objects but scroll bars doesn't work when objects are bigger ten scroll area.
thanks in advance
best regards
Tomasz
some code would be helpful. Or can you re-frame your question
I don't have any code yet. I've just took 'Scroll Area' from 'Containers', put it on my window, an then put some stuff (like buttons) inside Scroll Area. Should I set some property to make it work? Other containers like 'Tab Widget' don't need any code.
thanks in advance
best regards
Tomasz
oh i did not realize you are using qt designer for it. The scrollarea can only have one one widget inside it. you want many widgets, so you should make a custom widget and put that inside the scrollarea. sorry i dont work with designer.
Tomasz (6th September 2010)
But even with one widget like Label or something else It doesn't work (widget inside is bigger then scroll area to see scrolling effect).
thanks in advance
best regards
Tomasz
you mean to say that the widget is bigger than the scrollarea and still the scrollbar doesnt come up? or the vice-versa?widget inside is bigger then scroll area to see scrolling effect
Yes, widget inside is bigger, and scrollbar doesn't come up.
Use layouts
Tomasz (6th September 2010)
I't works! Thanks! One more question about QScrollArea - how can I change width of scrolling bar? How should style sheet look like?
thanks in advance
best regards
Tomasz
And as a reminder, you should ALWAYS use layouts for EVERYTHING, because they align everything perfectly, even if the user has a different theme/font size.
Ok. But what about changing style of scroll bar? I want to change its width. How should my code look?
thanks in advance
best regards
Tomasz
take a look at the documentation for QStyle and QStylesheets
Bookmarks