PDA

View Full Version : how to draw a circle on a frame in Qt-4



grsandeep85
16th September 2009, 07:50
Hi All,

I have a Dialog which consists of two frame. In one frame i have three lineEdits namely XCenter, YCenter and Radius and values are entered to these lineEdits, when i press enter key from keyboard a circle has to draw on the another frame using QPainter. How to proceed with this.

Lykurg
16th September 2009, 08:05
use signal slot mechanism to update your label/frame. (QLineEdit::returnPressed() or keypressevent or install an event filter...)
use the paint() method
use QPainter::drawEllipse().