show the position in qlabel
Hi guys I have successfully able to get position of my coordinate from Qlabel...in Lineedit..:)....I displayed the Image in Qlabel
Now I want to show the co-ordinate position in Qlabel whenever I provide data from my lineedit.....(Just show the position the Qlabel)
Is it possible ...if the How??
please help me..
Every help shall be appreciated
Re: show the position in qlabel
Take a look at the "QPoint Qwidget :: pos( )const" method...
Re: show the position in qlabel
please elaborate it .....
Re: show the position in qlabel
Open up Qt Assistant --> Main Classes --> QWidget. Find a property called pos,read the given information.Pos is not the only geometry-related property,navigate through the Assistant and you'll find the one you need.
Re: show the position in qlabel
Actually I want to only show position in Qlabel whenever I provide co-ordinate value from line edit...
how is it possible??
Re: show the position in qlabel
hi ready,
Quote:
whenever I provide data from my lineedit.....(Just show the position the Qlabel)
so you want to show the image qlabel's position, in another qlabel?
Quote:
Now I want to show the co-ordinate position in Qlabel whenever I provide data from my lineedit
what is the data you provide in lineedit?
if you want to show the image position in another label,
Code:
showLabel
->setText
(QString::number(imgLabel
->x
())+"," +QString::number(imgLabel
->y
()));
Re: show the position in qlabel
Quote:
so you want to show the image qlabel's position, in another qlabel?
yes ..you are right.:)
let's forget about lineedit at this moment
Added after 32 minutes:
come on .......somebody must have Idea how to do this....
I have already recieved x-cordinate from mouseevent....in QLabel ...
I want to do the reverse process....i.e....provide....coordinate value to qlabel and show the position in Qlabel(just to indicate)
Re: show the position in qlabel
Even I want to solve the same problem...:)
Re: show the position in qlabel
hi @jerkymotion,
Code:
showLabel
->setText
(QString::number(imgLabel
->x
())+"," +QString::number(imgLabel
->y
()));
did u try the above code?
@ready,
Quote:
come on .......somebody must have Idea how to do this....
I have already recieved x-cordinate from mouseevent....in QLabel ...
I want to do the reverse process....i.e....provide....coordinate value to qlabel and show the position in Qlabel(just to indicate)
provide coordinate value to qlabel means you want to move the qlabel?
Quote:
I want to only show position in Qlabel whenever I provide co-ordinate value from line edit
imgLabel->move(x,y);
you need to get the x, y value from your lineedit.
hope it helps,
Bala