PDA

View Full Version : Qlabel Event no open window/form!



vProgramm
29th January 2015, 03:08
Hello, i created a food system with click images, but the images no open a window and/or form respective the your category. i would like of know if is possible create this form of label clickable? If possible show me some tutorial.

sorry for my english, i'm brazilian and am studing english.

anda_skoa
29th January 2015, 09:52
You need to create a subclass of QLabel and implement the mouse event methods, e.g. at least mouseReleaseEvent().
Your class can then send out a signal which you connect to whatever code opens the other form.

Alternatively you could try a QPushButton instead of a label, it already can detect clicks.

Cheers,
_

xervith
12th February 2015, 00:06
As above...You need to create a subclass of QLabel
There is video on yt Subclassing QLabel (https://www.youtube.com/watch?v=JN36p7JgPcU)