PDA

View Full Version : Easy KeyBinder, problem with load and save.



Alan_K
31st August 2010, 12:15
Hello everybody.
My english not too good, sorry.

I'm beginner programmer. I had hope all will okay, but I wrong. I have a problem, I create simple KeyBinder - save and load *.txt file not work, I have a form (ten slots - lineEdit). I want to, contents form field save to file according to the formula:


Al has a cat. || Ben has a dog. || Thomas has a bear.
etc.

Load the file and puts its content in form. In short, it comes to saving the template file.


I hope that you are going to help me. See you.

Urthas
31st August 2010, 21:47
To get the text from your QlineEdits, call QLineEdit's text() method.

To write to a file, see the documentation for QFile.

I can't be any more specific until you are.

Alan_K
3rd September 2010, 19:20
Thank you very much, I managed to do it. I have another problem - the function will not be made in another application, because the mine is inactive (inactive window, the function should be performed after a short keyboard)

Do you have any idea how to do it? May use the bus D-bus?

Regards.


Sorry, google translate :x

Urthas
8th September 2010, 02:01
Sorry, google translate :x

Yeah...unfortunately I really don't understand what you are asking. :(

Do you mean that the function should be performed after the user activates a keyboard shortcut? If so, then you should read the documentation for the QShortcut and/or QKeySequence classes.