Reply
Thread Tools
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#1
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 ??
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Hi,

Originally Posted by ahmadka View Post
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 ..
you find all the supported signals/slots of each class in the official documentation. (Small hint: if you click F1, while browsing over a class in QtCreator, you get there directly). What you want to do, is overwriting the mouse event function and handling the event for your needs.

Daniel
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:58.