Image 01
profile-image

philvl

Phil V.L
Utilities
QLed

Qt Widgets by qphoton 44 comments

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