示例#1
0
void
AnimatedSplitter::onHiddenSizeChanged()
{
    AnimatedWidget* w = (AnimatedWidget*)(sender());
    int i = indexOf( w );

    m_sizes.replace( i, w->hiddenSize() );
}
示例#2
0
void
AnimatedSplitter::onResizeRequest( const QPoint& delta )
{
    AnimatedWidget* w = (AnimatedWidget*)(sender());
    if ( indexOf( w ) > 0 )
    {
        int newheight = w->height() + delta.y();
        if ( newheight <= w->hiddenSize().height() )
        {
            w->hide();
        }
        else
            changeSize( w, QSize( w->width(), newheight ) );
    }
    else
        Q_ASSERT( false );
}