PDA

View Full Version : [Qt Creator] Need help in developing a paiting app



ahmadka
10th June 2010, 11:59
Hello everyone ... Well I'm new to Qt and all, and I'm trying to develop a painting related app which paints on the screen in some areas depending on user input ...

Now I'm following this tutorial here which uses the 'paintEvent' signal to draw some lines on the widget (QMainWindow) ..:

http://zetcode.com/tutorials/qt4tutorial/painting/

What I need is to have some kind of an event (or signal) associated with this main window which triggers the paintEvent when there is a mouseDown event, or something similar ... problem is that I cannot find all the events/signals QMainWindow supports .. The only way I know how to find out which events/signals a control responds to is by right clicking on the control and clicking on 'Go to Slot ...' option ... but here, the signals I see are very less (as compared to the 'events' supported in VS2008 for example, which has a lot more)

Uptill now, I've developed nearly all my apps for Windows in VS, so I'm a lot more used to that, but since now I want to develop for Maemo, I'm forced to use Qt Creator etc ..

Any help in this ??

high_flyer
10th June 2010, 12:32
problem is that I cannot find all the events/signals QMainWindow supports
Where did you look for them?
There are all here:
http://doc.trolltech.com/4.6/qmainwindow-members.html

You might want to look at the various mouse event handlers such as mousePressedEvent() etc.