<class name="QScrollArea" doc="/**
&lt;p&gt;The &lt;a href=&quot;QScrollArea.html#QScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QScrollArea&lt;/tt&gt;&lt;/a&gt; class provides a scrolling view onto another widget.&lt;/p&gt;
&lt;p&gt;A scroll area is used to display the contents of a child widget within a frame. If the widget exceeds the size of the frame, the view can provide scroll bars so that the entire area of the child widget can be viewed. The child widget must be specified with &lt;a href=&quot;QScrollArea.html#setWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setWidget&lt;/tt&gt;&lt;/a&gt;. For example:&lt;/p&gt;
&lt;pre&gt;    QLabel *imageLabel = new QLabel;
    QImage image(&amp;quot;happyguy.png&amp;quot;);
    imageLabel-&amp;gt;setPixmap(QPixmap::fromImage(image));

    scrollArea = new QScrollArea;
    scrollArea-&amp;gt;setBackgroundRole(QPalette::Dark);
    scrollArea-&amp;gt;setWidget(imageLabel);&lt;/pre&gt;
&lt;p&gt;The code above creates a scroll area (shown in the images below) containing an image label. When scaling the image, the scroll area can provide the necessary scroll bars:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qscrollarea-noscrollbars.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qscrollarea-onescrollbar.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qscrollarea-twoscrollbars.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The scroll bars appearance depends on the currently set scroll bar policies&lt;/tt&gt;. You can control the appearance of the scroll bars using the inherited functionality from &lt;a href=&quot;QAbstractScrollArea.html#QAbstractScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QAbstractScrollArea&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example, you can set the QAbstractScrollArea::horizontalScrollBarPolicy and QAbstractScrollArea::verticalScrollBarPolicy properties. Or if you want the scroll bars to adjust dynamically when the contents of the scroll area changes, you can use the horizontalScrollBar() and verticalScrollBar() functions (which enable you to access the scroll bars) and set the scroll bars' values whenever the scroll area's contents change, using the QScrollBar::setValue() function.&lt;/p&gt;
&lt;p&gt;You can retrieve the child widget using the &lt;a href=&quot;QScrollArea.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt; function. The view can be made to be resizable with the &lt;a href=&quot;QScrollArea.html#setWidgetResizable(boolean)&quot;&gt;&lt;tt&gt;setWidgetResizable&lt;/tt&gt;&lt;/a&gt; function. The alignment of the widget can be specified with &lt;a href=&quot;QScrollArea.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When using a scroll area to display the contents of a custom widget, it is important to ensure that the size hint&lt;/tt&gt; of the child widget is set to a suitable value. If a standard &lt;a href=&quot;QWidget.html#QWidget(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt; is used for the child widget, it may be necessary to call QWidget::setMinimumSize() to ensure that the contents of the widget are shown correctly within the scroll area.&lt;/p&gt;
&lt;p&gt;Two convenience functions &lt;a href=&quot;QScrollArea.html#ensureVisible(int, int, int, int)&quot;&gt;&lt;tt&gt;ensureVisible&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QScrollArea.html#ensureWidgetVisible(com.trolltech.qt.gui.QWidget, int, int)&quot;&gt;&lt;tt&gt;ensureWidgetVisible&lt;/tt&gt;&lt;/a&gt; ensure a certain region of the contents is visible inside the viewport, by scrolling the contents if necessary.&lt;/p&gt;
&lt;p&gt;For a complete example using the &lt;a href=&quot;QScrollArea.html#QScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QScrollArea&lt;/tt&gt;&lt;/a&gt; class, see the Image Viewer&lt;/tt&gt; example. The example shows how to combine &lt;a href=&quot;QLabel.html&quot;&gt;&lt;tt&gt;QLabel&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QScrollArea.html#QScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QScrollArea&lt;/tt&gt;&lt;/a&gt; to display an image.&lt;/p&gt;

@see &lt;a href=&quot;QAbstractScrollArea.html#QAbstractScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QAbstractScrollArea&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QScrollBar.html&quot;&gt;&lt;tt&gt;QScrollBar&lt;/tt&gt;&lt;/a&gt;
@see Image Viewer Example&lt;/tt&gt; */">
    <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/**
&lt;p&gt;This signal is emitted when the widget's &lt;a href=&quot;QWidget.html#contextMenuPolicy()&quot;&gt;&lt;tt&gt;contextMenuPolicy&lt;/tt&gt;&lt;/a&gt; is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position &lt;tt&gt;pos&lt;/tt&gt; is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is &lt;a href=&quot;QAbstractScrollArea.html#QAbstractScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QAbstractScrollArea&lt;/tt&gt;&lt;/a&gt; and its subclasses that map the context menu event to coordinates of the viewport()&lt;/tt&gt; .&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.QPoint pos)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)&quot;&gt;&lt;tt&gt;mapToGlobal&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMenu.html&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QWidget.html#contextMenuPolicy()&quot;&gt;&lt;tt&gt;contextMenuPolicy&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QScrollArea(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Constructs an empty scroll area with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#setWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QScrollArea()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QScrollArea.html#QScrollArea(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QScrollArea&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/**
&lt;p&gt;Returns the alignment of the scroll area's widget.&lt;/p&gt;
&lt;p&gt;By default, the widget stays rooted to the top-left corner of the scroll area.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void ensureVisible(int x, int y, int xmargin, int ymargin)" doc="/**
&lt;p&gt;Scrolls the contents of the scroll area so that the point (&lt;tt&gt;x&lt;/tt&gt;, &lt;tt&gt;y&lt;/tt&gt;) is visible inside the region of the viewport with margins specified in pixels by &lt;tt&gt;xmargin&lt;/tt&gt; and &lt;tt&gt;ymargin&lt;/tt&gt;. If the specified point cannot be reached, the contents are scrolled to the nearest valid position. The default value for both margins is 50 pixels.&lt;/p&gt;
 */"/>
    <method name="public final void ensureVisible(int x, int y, int xmargin)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QScrollArea.html#ensureVisible(int, int, int, int)&quot;&gt;&lt;tt&gt;ensureVisible&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;x&lt;/tt&gt;, &lt;tt&gt;y&lt;/tt&gt;, &lt;tt&gt;xmargin&lt;/tt&gt;, 50). */"/>
    <method name="public final void ensureVisible(int x, int y)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QScrollArea.html#ensureVisible(int, int, int, int)&quot;&gt;&lt;tt&gt;ensureVisible&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;x&lt;/tt&gt;, &lt;tt&gt;y&lt;/tt&gt;, 50, 50). */"/>
    <method name="public final void ensureWidgetVisible(com.trolltech.qt.gui.QWidget childWidget, int xmargin, int ymargin)" doc="/**
&lt;p&gt;Scrolls the contents of the scroll area so that the &lt;tt&gt;childWidget&lt;/tt&gt; of QScrollArea::widget() is visible inside the viewport with margins specified in pixels by &lt;tt&gt;xmargin&lt;/tt&gt; and &lt;tt&gt;ymargin&lt;/tt&gt;. If the specified point cannot be reached, the contents are scrolled to the nearest valid position. The default value for both margins is 50 pixels.&lt;/p&gt;
 */"/>
    <method name="public final void ensureWidgetVisible(com.trolltech.qt.gui.QWidget childWidget, int xmargin)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QScrollArea.html#ensureWidgetVisible(com.trolltech.qt.gui.QWidget, int, int)&quot;&gt;&lt;tt&gt;ensureWidgetVisible&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;childWidget&lt;/tt&gt;, &lt;tt&gt;xmargin&lt;/tt&gt;, 50). */"/>
    <method name="public final void ensureWidgetVisible(com.trolltech.qt.gui.QWidget childWidget)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QScrollArea.html#ensureWidgetVisible(com.trolltech.qt.gui.QWidget, int, int)&quot;&gt;&lt;tt&gt;ensureWidgetVisible&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;childWidget&lt;/tt&gt;, 50, 50). */"/>
    <method name="public final void setAlignment(com.trolltech.qt.core.Qt.Alignment arg__1)" doc="/**
&lt;p&gt;Sets the alignment of the scroll area's widget to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;By default, the widget stays rooted to the top-left corner of the scroll area.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#alignment()&quot;&gt;&lt;tt&gt;alignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setWidget(com.trolltech.qt.gui.QWidget widget)" doc="/**
&lt;p&gt;Sets the scroll area's &lt;tt&gt;widget&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;widget&lt;/tt&gt; becomes a child of the scroll area, and will be destroyed when the scroll area is deleted or when a new widget is set.&lt;/p&gt;
&lt;p&gt;Note that if the scroll area is visible when the &lt;tt&gt;widget&lt;/tt&gt; is added, you must show() it explicitly.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setWidgetResizable(boolean resizable)" doc="/**
&lt;p&gt;Sets whether the scroll area should resize the view widget to &lt;tt&gt;resizable&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If this property is set to false (the default), the scroll area honors the size of its widget. Regardless of this property, you can programmatically resize the widget using &lt;a href=&quot;QScrollArea.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt;-&amp;gt;&lt;a href=&quot;QWidget.html#resize(int, int)&quot;&gt;&lt;tt&gt;resize&lt;/tt&gt;&lt;/a&gt;, and the scroll area will automatically adjust itself to the new size.&lt;/p&gt;
&lt;p&gt;If this property is set to true, the scroll area will automatically resize the widget in order to avoid scroll bars where they can be avoided, or to take advantage of extra space.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#widgetResizable()&quot;&gt;&lt;tt&gt;widgetResizable&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget takeWidget()" doc="/**
&lt;p&gt;Removes the scroll area's widget, and passes ownership of the widget to the caller.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget widget()" doc="/**
&lt;p&gt;Returns the scroll area's widget, or 0 if there is none.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#setWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean widgetResizable()" doc="/**
&lt;p&gt;Returns whether the scroll area should resize the view widget.&lt;/p&gt;
&lt;p&gt;If this property is set to false (the default), the scroll area honors the size of its widget. Regardless of this property, you can programmatically resize the widget using &lt;a href=&quot;QScrollArea.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt;-&amp;gt;&lt;a href=&quot;QWidget.html#resize(int, int)&quot;&gt;&lt;tt&gt;resize&lt;/tt&gt;&lt;/a&gt;, and the scroll area will automatically adjust itself to the new size.&lt;/p&gt;
&lt;p&gt;If this property is set to true, the scroll area will automatically resize the widget in order to avoid scroll bars where they can be avoided, or to take advantage of extra space.&lt;/p&gt;

@see &lt;a href=&quot;QScrollArea.html#setWidgetResizable(boolean)&quot;&gt;&lt;tt&gt;setWidgetResizable&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean event(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean eventFilter(com.trolltech.qt.core.QObject arg__1, com.trolltech.qt.core.QEvent arg__2)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected boolean focusNextPrevChild(boolean next)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void resizeEvent(com.trolltech.qt.gui.QResizeEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void scrollContentsBy(int dx, int dy)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.core.QSize sizeHint()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
</class>
