Results 1 to 7 of 7

Thread: QVariant canConvert<>() issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QVariant canConvert<>() issue

    I don't see the problem. canConvert() tells you it will be able to perform the conversion from double to double; that isn't surprising. Then when you perform a conversion from double to bool, it is able to perform that conversion as well - with the resulting bool being false. Why is this an issue?

    There's a difference between being able to perform a conversion and the result of the conversion.

  2. The following user says thank you to SixDegrees for this useful post:

    nikhilqt (10th June 2010)

Similar Threads

  1. Replies: 1
    Last Post: 4th December 2009, 17:03
  2. VARIANT <-> QVariant
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 26th September 2009, 23:39
  3. a question about QVariant
    By calmspeaker in forum Qt Programming
    Replies: 4
    Last Post: 14th August 2009, 07:42
  4. QVariant to QAxObject*
    By QDrow in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2008, 09:35
  5. QTextCharFormat and QVariant
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 16th May 2007, 11:55

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
  •  
Qt is a trademark of The Qt Company.