Results 1 to 4 of 4

Thread: Char* <-> QString implicit conversion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Char* <-> QString implicit conversion

    The function declaration:
    Qt Code:
    1. QList<QStringList> select(QString& from, QString& where, QStringList* what=0);
    To copy to clipboard, switch view to plain text mode 

    How I call it:
    Qt Code:
    1. QList<QStringList> dirs = svh->select("dirs", QString().setNum(dir->getId()));
    To copy to clipboard, switch view to plain text mode 

    The Error I get:
    Qt Code:
    1. /home/finn/client_gallery/dirparser.cpp:24: error: no matching function for call to ‘SqlViaHttp::select(const char [5], QString&)’
    To copy to clipboard, switch view to plain text mode 


    //EDIT:
    Ahh, ok, I know so the solution.
    I have to use QString instead of QString& in the Declaration.
    Why is that?
    Last edited by kingfinn; 12th March 2010 at 17:51.

Similar Threads

  1. char* to QString: conversion
    By abghosh in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2010, 09:32
  2. Conversion Char Array to string
    By anafor2004 in forum Newbie
    Replies: 6
    Last Post: 6th May 2008, 14:35
  3. qreal -> QString conversion
    By MarkoSan in forum Newbie
    Replies: 2
    Last Post: 13th April 2008, 14:37
  4. QString iso 8859-1 conversion
    By mattia in forum Newbie
    Replies: 11
    Last Post: 21st January 2008, 14:17
  5. Conversion from unsigned char* to unsigned char
    By santosh.kumar in forum General Programming
    Replies: 1
    Last Post: 6th August 2007, 13:12

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.