We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e664f7f commit 28f7098Copy full SHA for 28f7098
rviz_plugin_tutorials/src/drive_widget.cpp
@@ -43,6 +43,9 @@ DriveWidget::DriveWidget( QWidget* parent )
43
, linear_max_( 10 )
44
, angular_max_( 2 )
45
{
46
+ QSizePolicy policy = sizePolicy();
47
+ policy.setHeightForWidth( true );
48
+ setSizePolicy( policy );
49
}
50
51
void DriveWidget::paintEvent( QPaintEvent* event )
rviz_plugin_tutorials/src/drive_widget.h
@@ -47,6 +47,7 @@ Q_OBJECT
virtual void leaveEvent( QEvent* event );
virtual QSize sizeHint() const { return QSize( 150, 150 ); }
+ virtual int heightForWidth( int width ) const { return width; } // enforce square widget
52
Q_SIGNALS:
53
void outputVelocity( float linear, float angular );
0 commit comments