I have placed images in QLabel and want to view it larger when I clicks it ......
I have placed images in QLabel and want to view it larger when I clicks it ......
Regards:
Prajnaranjan Das
e mail: prajnaranjan.das@gmail.com
What is the problem you have?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I want to perform click operation on QLabel so that the image I have used should become larger...I have used keyPressEvent(QKeyEvent *event) but Its not showing anything ....
Regards:
Prajnaranjan Das
e mail: prajnaranjan.das@gmail.com
show your code.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Qt Code:
{ switch (event->key()) { case Qt::Key_Home: if (event->modifiers() & Qt::ControlModifier) { goToBeginningOfDocument(); } else { goToBeginningOfLine(); } break; case Qt::Key_End: ... default: } }To copy to clipboard, switch view to plain text mode
Last edited by high_flyer; 17th December 2010 at 12:49.
Regards:
Prajnaranjan Das
e mail: prajnaranjan.das@gmail.com
And where is the code that should enlarge the image ?
You have reimplemented keyPressEvent, which is responsible for keyboard events.
If you want to perform actions on mouse button click, you need to reimplement QWidget::mousePressEvent.I want to perform click operation on QLabel so that the image I have used should become larger...I have used keyPressEvent(QKeyEvent *event) but Its not showing anything ....
Where is code that is supposed to enlarge the image?I want to perform click operation on QLabel so that the image I have used should become larger
EDIT: oops, someone was faster :-)
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
thanks for your reply….Can you please give me a link related to keyPress and mousePressEvent or any example for this….
Regards:
Prajnaranjan Das
e mail: prajnaranjan.das@gmail.com
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks