Results 1 to 3 of 3

Thread: QTextCharFormat and QVariant

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTextCharFormat and QVariant

    According to the docs, it should be possible to write custom types to a QVariant and to read them from it. As QSettings supports QVariant it implicitly means that you can write custom types to QSettings and get them back. Nice theory but does it work? I tried with QTextCharFormat (declaring the metatype, registering it and registering stream operators) : segfault when reading the QSettings previusly written. I tried the same thing with QTextFormat (base class of QTexCharFormat, which has operators defined) : segfault at the same place... However, when I tried to save/reload QTextCharFormat objects using a QDataStream, everything went fine... Is it me or is QSettings badly broken???

    P.S : I'm using Qt 4.2.2
    Last edited by fullmetalcoder; 15th May 2007 at 19:58.
    Current Qt projects : QCodeEdit, RotiDeCode

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.