

Utilities
hello,
I like your button for industrial application.
They look like to LabView Style.
You can force your widget to keep a square ratio :
add this in paint event :
int side = qMin(width(),height());
QPainter painter(this);
painter.setViewport((width() - side) / 2, (height() - side) / 2, side, side);
best regards - Jan 24 2009
I like your button for industrial application.
They look like to LabView Style.
You can force your widget to keep a square ratio :
add this in paint event :
int side = qMin(width(),height());
QPainter painter(this);
painter.setViewport((width() - side) / 2, (height() - side) / 2, side, side);
best regards - Jan 24 2009