Results 1 to 4 of 4

Thread: pass QByteArray as a pointer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2012
    Location
    Hungary, Budapest
    Posts
    9
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default pass QByteArray as a pointer

    Hi,
    How can I pass QByteArray as a pointer.
    My function:
    void removeStars(QByteArray *array){
    //something
    }
    And I am doing this:

    QByteArray array;
    ...
    removeStars(&array);

    I got this error:
    QByteArray:perator QNoImplicitBoolCast() const’ is private

    I tried as it would be char * but it didn’t work too. I mean I used this array like a pointer when I passed it.
    David

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: pass QByteArray as a pointer

    Why do you want to pass a byte array as pointer?

    By the way, the error you are getting is not related to the code you posted.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. how to pass a QList pointer
    By ehnuh in forum Qt Programming
    Replies: 2
    Last Post: 5th November 2012, 16:30
  2. Replies: 1
    Last Post: 4th December 2010, 17:20
  3. Replies: 7
    Last Post: 8th August 2010, 09:05
  4. Replies: 14
    Last Post: 1st December 2009, 20:45
  5. Replies: 9
    Last Post: 25th July 2009, 13:27

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.