[Qt-interest] Passing QList<QStringList> as arguments

David Villalobos Cambronero david.villalobos.c at gmail.com
Tue Aug 24 19:33:45 CEST 2010


Hi Scott, I just try, and got the same error.

Regards
---
David


On Tue, Aug 24, 2010 at 11:28, Scott Aron Bloom
<Scott.Bloom at onshorecs.com>wrote:

>  Did you try explicitly include <QList> and <QString> and <QStringList>
>
> Scott
>
>
>
> *From:* qt-interest-bounces at trolltech.com [mailto:
> qt-interest-bounces at trolltech.com] *On Behalf Of *David Villalobos
> Cambronero
> *Sent:* Tuesday, August 24, 2010 10:24 AM
> *To:* qt-interest at trolltech.com
> *Subject:* [Qt-interest] Passing QList<QStringList> as arguments
>
>
>
> Hi all, hope you can help me.
>
> Here is the scenario:
>
> I need to pass a function a QList<QStringList> param. I take a look at the
> nestedlayouts example, basically it has the following lines:
>
> QList<QStringList> rows = QList<QStringList>()
>         << (QStringList() << "Verne Nilsen" << "123")
>         << (QStringList() << "Carlos Tang" << "77")
>         << (QStringList() << "Bronwyn Hawcroft" << "119")
>         << (QStringList() << "Alessandro Hanssen" << "32")
>         << (QStringList() << "Andrew John Bakken" << "54")
>         << (QStringList() << "Vanessa Weatherley" << "85")
>         << (QStringList() << "Rebecca Dickens" << "17")
>         << (QStringList() << "David Bradley" << "42")
>         << (QStringList() << "Knut Walters" << "25")
>         << (QStringList() << "Andrea Jones" << "34");
>
> I can run the example without any problem. But if I copy and paste these
> two lines in my proyect:.
> QList<QStringList> rows = QList<QStringList>()
>         << (QStringList() << "Verne Nilsen" << "123");
>
> I got he followin error:
> error: variable ‘QList<QStringList> rows’ has initializer but incomplete
> type
> error: invalid use of incomplete type ‘class QList<QStringList>’
>
> The example and my project both uses QtGui.
>
> Any idea?
>
> Regards
> ---
> David
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100824/81a4b465/attachment.html 


More information about the Qt-interest-old mailing list