Results 1 to 2 of 2

Thread: What is multi-variant string?

  1. #1
    Join Date
    Oct 2011
    Posts
    7
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question What is multi-variant string?

    Hey:
    I just read the documentation about Qt::TextFlag.
    There is a sentence "Always use the longest variant when computing the size of a multi-variant string.".
    Can anybody tell me what the "multi-variant string" is?

    Thanks~~

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What is multi-variant string?

    I think it means that when you set multiple TextFlag options, each of which can cause an increase in the length of a string (by adding CRLF, tabs, etc.) then you should use the flag that could cause the largest possible increase in size when computing the length. I have no idea how one would determine which flag that would be, and by how much it increases the length.

    The use of the word "variant" is unfortunate, since it obviously causes confusion with QVariant and in this context has nothing to do with that. In this usage, variant and multi-variant are used in their traditional sense: to describe one (the "variant") of multiple possibilities (the "multi-variant").

Similar Threads

  1. Replies: 1
    Last Post: 17th April 2010, 19:08
  2. VARIANT <-> QVariant
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 26th September 2009, 23:39
  3. can't show value of variant
    By guchangyuan in forum Qt Tools
    Replies: 3
    Last Post: 3rd August 2009, 12:34
  4. accumulate variant
    By mickey in forum General Programming
    Replies: 6
    Last Post: 24th August 2008, 11:56
  5. pixmap from variant
    By kernel_panic in forum Qt Programming
    Replies: 1
    Last Post: 30th January 2007, 10:40

Tags for this Thread

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.