PDA

View Full Version : PyQT Problems



Detrexer
27th May 2008, 08:36
Hi Guys

Please don't mind my bad English im just a 16 year old German ;)
I'm facing the following Problem at the moment:

In school, we should make a Python Project and we could choose what we want to do.
I decided to do a little Gui programm using PyQT and well tomorrow we have to be finished...

Now to my Questions:

How can i read the Content of a QTextEdit Widget line by line and how can i write it in line by line?

How can i read out the content of a QLineEdit Widget?

How can i set and Read out the Date of a QDateEdit Widget?

Thanks fo your help!
Detrexer

jacek
27th May 2008, 21:08
How can i read the Content of a QTextEdit Widget line by line and how can i write it in line by line?
To append a line you can use QTextEdit::append(). Reading line by line is a bit more complex, but you can get all of the text with QTextEdit::toPlainText() (the docs are for C++ version, but PyQt behaves almost the same).


How can i read out the content of a QLineEdit Widget?
See QLineEdit::text() and QLineEdit::setText() methods.


How can i set and Read out the Date of a QDateEdit Widget?
See QDateTime::date() and QDateTime::setDate() methods.