Results 1 to 2 of 2

Thread: Saving QTransform in QSettings

  1. #1
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Saving QTransform in QSettings

    Hello!

    I want to save QTransform objects in QSettings. This seems to work fine:

    Qt Code:
    1. QTransform transform;
    2. QSettings settings;
    3. settings.setValue("one", transform);
    To copy to clipboard, switch view to plain text mode 

    Now I want to load the transform again and do something like

    Qt Code:
    1. QTtransform transform;
    2. transform = settings.getValue("one");
    To copy to clipboard, switch view to plain text mode 

    but this doesn't work. I don't understand how to use the convert() function.

    A little help please?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Saving QTransform in QSettings

    Qt Code:
    1. transform = settings.getValue("one").value<QTransform>();
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Cruz (17th November 2012)

Similar Threads

  1. Replies: 3
    Last Post: 18th September 2012, 04:46
  2. OSX QSettings IniFormat SystemScope saving inside the bundle
    By JoZCaVaLLo in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2012, 10:21
  3. Replies: 1
    Last Post: 14th January 2011, 11:57
  4. QTransform()
    By mkind in forum Newbie
    Replies: 0
    Last Post: 19th February 2010, 21:45
  5. Migrate Qt3 QSettings to Qt4 QSettings
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2008, 03:21

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.