LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2003, 08:13 AM   #1
stu12345
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
QT problem


does anyone know how can i update a QLineEdit
while in a loop ?
it appears that the QLineEdit updates only after i have exited the SLOT (loop) generated by a Start SIGNAL.

thanks.
 
Old 07-28-2003, 04:21 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Not quite sure whether I understand
the question ...

You might need to write a new keyboard
event handler that updates the elements
on each keystroke?

Cheers,
Tink
 
Old 07-28-2003, 05:41 PM   #3
epicurus
LQ Newbie
 
Registered: Jul 2003
Posts: 16

Rep: Reputation: 0
stu12345: are you just using setText()? It's probably because the slot/signal stuff happens to execute in the main thread, which I assume your code is in.. none of the gui will update until your code is done. (Unless Qt has some function to force the GUI to update itself, which I would assume it does, though I don't know it..) Alternatively, you could put the code in a seperate thread.


edit: Have you tried just calling update() on the object?

edit, duble: Failing that, try calling repaint() on it... that is, it's repaint() method.

Last edited by epicurus; 07-28-2003 at 06:00 PM.
 
Old 07-29-2003, 11:02 AM   #4
stu12345
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Original Poster
Rep: Reputation: 0
thanks ill try repaint()
 
Old 07-29-2003, 02:33 PM   #5
epicurus
LQ Newbie
 
Registered: Jul 2003
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by stu12345
thanks ill try repaint()

Lemme know if it works.
 
Old 07-31-2003, 09:31 AM   #6
stu12345
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Original Poster
Rep: Reputation: 0
it didn't work !
i have in my program a QGLWidget which is updating !!
but the QLineEdit which is a public member of it, does not !?
 
Old 07-31-2003, 10:16 AM   #7
stu12345
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Original Poster
Rep: Reputation: 0
well, i'v finally done it
it took 2 code lines !!
first clear() the line.
then insert() in the line ?!

now can anyone tell me what the hell is the difference from setText() ???????
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration