Results 1 to 2 of 2

Thread: incomplete type ? (error)

  1. #1
    Join Date
    Dec 2012
    Posts
    13
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default incomplete type ? (error)

    I have slot:
    Qt Code:
    1. void Image::imagechange(QStringList filelist) // error: 'filelist' has incomplete type.
    2. {
    3. qDebug() << "imagechange";
    4. QString imagepath;;
    5. emit signal_show_image(imagepath);
    6. }
    To copy to clipboard, switch view to plain text mode 

    header:
    Qt Code:
    1. public slots:
    2. void imagechange(QStringList filelist);
    To copy to clipboard, switch view to plain text mode 

    Signal emit from:
    Qt Code:
    1. connect (myunzip,SIGNAL(signal_show_image(QStringList)),this,SLOT(unzipdone(QStringList)));
    2. connect (this,SIGNAL(signal_unzip_done(QStringList)),image,SLOT(imagechange(QStringList)));
    3.  
    4.  
    5. void ComicView::unzipdone(QStringList filelist)
    6. {
    7. emit signal_unzip_done(filelist);
    8. }
    To copy to clipboard, switch view to plain text mode 

    myunzip:
    Qt Code:
    1. .........
    2. QStringList filelist, numberlist, dirpath;
    3. // QString dirpath;
    4. if( !list.isEmpty() )
    5. {
    6. int num_total = list.count();
    7.  
    8. for (int i = 0; i < num_total; ++i)
    9. {
    10. const UnZip::ZipEntry& entry = list.at(i);
    11.  
    12. if( entry.type != UnZip::Directory)
    13. {
    14. numberlist << "picture"+QString::number(i);
    15. }
    16. else
    17. {
    18. filelist << entry.filename;
    19. }
    20. }
    21. }
    22.  
    23. qDebug() << filelist;
    24. emit signal_show_image(filelist);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: incomplete type ? (error)

    You must put somewhere this line
    Qt Code:
    1. #include <QStringList>
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 2
    Last Post: 13th October 2012, 16:58
  2. error: invalid use of incomplete type 'struct QMetaEnum'
    By dyngoman in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2010, 13:38
  3. Replies: 1
    Last Post: 4th September 2008, 14:55
  4. Compilation error: "field 'xxx' has incomplete type"
    By fedcer in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 15:01
  5. Replies: 3
    Last Post: 4th August 2006, 12:05

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.