How to disable scroll bars in QPrintPreviewWidget?
Hi All,
I am creating a customized print preview dialog.
In my dialog I am using QPrintPreviewWidget.
I am able to show my print preview. In case if the preview has multiple pages then a scrollbar comes up.
I need to disable the scroll bars which is provided by QPrintPreviewWidget. Any idea how to do this?
Sorry if this is a silly doubt, I am new to QT thats why.... :-)
Regards,
R Manu
Re: How to disable scroll bars in QPrintPreviewWidget?
It is not directly exposed so you have to use QObject introspection to find the scroll area inside the preview widget:
Code:
if (area) {
area->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}