本文整理汇总了C++中QScrollView::inherits方法的典型用法代码示例。如果您正苦于以下问题:C++ QScrollView::inherits方法的具体用法?C++ QScrollView::inherits怎么用?C++ QScrollView::inherits使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScrollView
的用法示例。
在下文中一共展示了QScrollView::inherits方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateWidgetPositions
// FIXME: This should not be necessary. Remove this once WebKit knows to properly schedule
// layouts using WebCore when objects resize.
void RenderPart::updateWidgetPositions()
{
if (!m_widget)
return;
#if KWIQ
return;
#endif
int x, y, width, height;
absolutePosition(x,y);
x += borderLeft() + paddingLeft();
y += borderTop() + paddingTop();
width = m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight();
height = m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom();
QRect newBounds(x,y,width,height);
if (newBounds != m_widget->frameGeometry()) {
// The widget changed positions. Update the frame geometry.
RenderArena *arena = ref();
element()->ref();
m_widget->setFrameGeometry(newBounds);
element()->deref();
deref(arena);
QScrollView *view = static_cast<QScrollView *>(m_widget);
if (view && view->inherits("KHTMLView"))
static_cast<KHTMLView*>(view)->layout();
}
}
示例2: slotViewCleared
void RenderFrame::slotViewCleared()
{
if(element() && m_widget->inherits("QScrollView")) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a scrollview!" << endl;
#endif
QScrollView *view = static_cast<QScrollView *>(m_widget);
if(!element()->frameBorder || !((static_cast<HTMLFrameSetElementImpl *>(element()->parentNode()))->frameBorder()))
view->setFrameStyle(QFrame::NoFrame);
#if APPLE_CHANGES
// Qt creates QScrollView w/ a default style of QFrame::StyledPanel | QFrame::Sunken.
else
view->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
#else
view->setHScrollBarMode(element()->scrolling );
view->setVScrollBarMode(element()->scrolling );
#endif
if(view->inherits("KHTMLView")) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a KHTMLview!" << endl;
#endif
KHTMLView *htmlView = static_cast<KHTMLView *>(view);
if(element()->marginWidth != -1) htmlView->setMarginWidth(element()->marginWidth);
if(element()->marginHeight != -1) htmlView->setMarginHeight(element()->marginHeight);
}
}
}