[Qt-interest] problem in lable

chandrasekar wagmare sekarwagmare at gmail.com
Wed Dec 17 14:05:52 CET 2008


hi friends,
I am using QLabel in the function and changing the text of the label in a
regular interval but when i run the program the intermediate label text is
not showing its text ...
if i use timer and it displaying but i cant use that for all label display
so how can i solve that .... how to make regular interval of time b/w labels
....


please help

in class fingerprint including Ui.h file having a lable(msgLabel) and a
pushbutton (capture)
 Qt Code:


   1. class FingerPrint::FingerPrint()
   2. {
   3.    setupUi(this);
   4.    msgLabel->setText("Click Capture");
   5.    connect(captureButton, SIGNAL(clicked()),this,SLOT(newPorting()));
   6. }

*in the connect slot calling a function returning CaptureImage() *
 Qt Code:


   1. void FingerPrint::newPorting()
   2. {
   3.          QString <http://doc.trolltech.com/latest/QString.html>
out = "Put your finger.";
   4.         msgLabel->clear();
   5.         msgLabel->setText(out);
   6.       res = CaptureFunc();
   7.     if(res == 0)
   8.         {
   9.                 originalPixmap = QPixmap
<http://doc.trolltech.com/latest/QPixmap.html>();
   10.                 msgLabel->setText("Image Captured..");
   11.                 FPSLabel->setPixmap((QPixmap
<http://doc.trolltech.com/latest/QPixmap.html>(QString
<http://doc.trolltech.com/latest/QString.html>::fromUtf8("Myimages/finger.bmp"))));
   12.          }
   13.         else
   14.                 msgLabel->setText("Failed..");
   15. }

in CaptureImage function
 Qt Code:


   1. int FingerPrint::CaptureFunc()
   2. {
   3. some code ....
   4.  some code ....
   5.  msgLabel->clear();
   6.         msgLabel->setText("Capturing the image ...");
   7.
   8. some code ....
   9. some code ....
   10. msgLabel->clear();
   11.         msgLabel->setText("Image Saved...");
   12.  return OK;
   13. }





this is my code here first in my window it should display in lable msgLable
*"click capture"*
next *Put your finger* and then inside Capture Image functions *Capturing
the image* and last is *Image Captured*

this what i programmed but ...
its coming only *ClickCapture* at first then at last printing B]Image
Captured[/b] in between text of msgLabel were not displaying ....

what is the exact problem .... please help ....



-- 
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081217/0bfbb752/attachment.html 


More information about the Qt-interest-old mailing list