The reason for this issue is, that the internal layout calculation is supressed while being in Qt::WA_WState_Polished state, but QEvent::PolishRequest is not implemented. Usually there will be a resize event coming later where the layout is calculated ( f.e when resizing the window of your demo ) - so that the issue is not there for most applications.
In SVN trunk it is fixed ( handling Qt::WA_WState_Polished ). If you need a workaround for Qwt 6.1 you could implement something like this:
{
....
protected:
virtual bool event
( QEvent *event
) {
if ( event
->type
() == QEvent::PolishRequest ) {
const int bw = borderWidth();
setBorderWidth( bw + 1 ); // layout calculation triggered
setBorderWidth( bw );
}
}
};
class YourSlider: public QwtSlider
{
....
protected:
virtual bool event( QEvent *event )
{
if ( event->type() == QEvent::PolishRequest )
{
const int bw = borderWidth();
setBorderWidth( bw + 1 ); // layout calculation triggered
setBorderWidth( bw );
}
return QwtSlider::event( event );
}
};
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks