Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
4.6.2
-
None
-
Windows/Qt 4.6.2
Description
The scroll bar policy for the QAbstractScrollArea that's created as a result of showing the preview widget cannot have its scrollbar policy set. Setting the scrollbar policy on the view itself doesn't affect the scrollbar policy of the preview widget container, which itself is a QAbstractScrollArea.
In an attempt to work around this, parentWidget was called on the actual preview widget and cast to QAbstractScrollArea*. setHorizontalScrollbarPolicy was then called on the resulting pointer. This failed with an exception since the QAbstractScrollArea appears to be incompletely initialised. When the old scrollbar policy is compared with the new scrollbar policy internally, the old policy is uninitialised and therefore throws an exception.
Either provide a way of setting the scrollbar policy on the container of the preview widget or ensure that it's possible to obtain a reference or pointer to the QAbstractScrollArea that contains the preview widget so that its scrollbar policy can be set.