Results 1 to 2 of 2

Thread: Comparing the |(shift+\) char

  1. #1
    Join Date
    Aug 2008
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Comparing the |(shift+\) char

    I'm parsing a QString looking for the bar(|) char but I get the error "call of overloaded `QChar(const char[2])' is ambiguous" if i do this:

    QChar cha("|");
    if(shapeText.at(i) == cha) {

    or

    if(shapeText.at(i) == "|") {

    How would one compare that char against a QChar?

  2. #2
    Join Date
    Aug 2008
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Comparing the |(shift+\) char

    Nevermind this

Similar Threads

  1. Char array[6] to QString and display it
    By arunvv in forum Newbie
    Replies: 11
    Last Post: 12th March 2014, 20:48
  2. char * problem
    By eleanor in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2008, 14:06
  3. unable to save QCStrings properly in a buffer
    By nass in forum Qt Programming
    Replies: 13
    Last Post: 15th November 2006, 20:49

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.