Results 1 to 4 of 4

Thread: Easy KeyBinder, problem with load and save.

  1. #1
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    19
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Easy KeyBinder, problem with load and save.

    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:

    Qt Code:
    1. Al has a cat. || Ben has a dog. || Thomas has a bear.
    To copy to clipboard, switch view to plain text mode 
    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.

  2. #2
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Easy KeyBinder, problem with load and save.

    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.

  3. The following user says thank you to Urthas for this useful post:

    Alan_K (3rd September 2010)

  4. #3
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    19
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Easy KeyBinder, problem with load and save.

    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

  5. #4
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Easy KeyBinder, problem with load and save.

    Quote Originally Posted by Alan_K View Post
    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.

Similar Threads

  1. Save/Load variables to FIle
    By Jordan in forum Qt Programming
    Replies: 2
    Last Post: 26th May 2010, 11:35
  2. Save/Load a game level using XML.
    By ricardo in forum Qt Programming
    Replies: 7
    Last Post: 13th July 2009, 09:45
  3. QStandardItemModel save/load Problem
    By sun in forum Newbie
    Replies: 9
    Last Post: 1st October 2008, 18:20
  4. Save to SVG and load from it
    By Radagast in forum Qt Programming
    Replies: 3
    Last Post: 14th June 2008, 14:22
  5. Can we save & load the settings in GUI !
    By Krish in forum Newbie
    Replies: 6
    Last Post: 26th March 2008, 15:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.