Utilizing ScrollView
Our RSS news reader is shaping up now. From now on, let's focus on the unpleasant details. The first thing we're going to add is a scroll bar. To be more specific, ScrollView
is about to be added.
Back in the Qt 4 era, you had to write your own ScrollView
component to gain this small yet very nice feature. Although you can utilize KDE Plasma Components' ScrollArea
on X11 Platforms, there are no Qt bundled modules for this purpose, which means you can't use these on Windows and Mac OS X. Thanks to the open governance of the Qt project, a lot of community code gets merged, especially from the KDE community. From Qt 5.1 onwards, we have the QtQuick.Controls
module, which has many built-in desktop components, including ScrollView
.
It's a very easy to use element that provides scroll bars and content frames for its child item. There can be only one direct Item
child, and this child is implicitly anchored to fill the ScrollView
component. This means that we only need to anchor...