Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Strange error with QDirIterator
Forum Updated to NodeBB v4.3 + New Features

Strange error with QDirIterator

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 332 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ademmlerA Offline
    ademmlerA Offline
    ademmler
    wrote on last edited by
    #1

    From documentation https://doc.qt.io/qt-5/qdiriterator.html I use:

    QDirIterator it(myDIR, QStringList() << "*.jpg" << "*.jpeg", QDir::NoFilter, QDir::Files);
    QDirIterator it(myDIR, {"*.jpg", "*.jpeg"}, QDir::Files);
    

    Now I get this error in both cases:
    mainwindow.cpp:14:18: error: variable has incomplete type 'QDirIterator'
    qdir.h:51:7: note: forward declaration of 'QDirIterator'

    Any idea?

    artwawA 1 Reply Last reply
    0
    • ademmlerA ademmler

      From documentation https://doc.qt.io/qt-5/qdiriterator.html I use:

      QDirIterator it(myDIR, QStringList() << "*.jpg" << "*.jpeg", QDir::NoFilter, QDir::Files);
      QDirIterator it(myDIR, {"*.jpg", "*.jpeg"}, QDir::Files);
      

      Now I get this error in both cases:
      mainwindow.cpp:14:18: error: variable has incomplete type 'QDirIterator'
      qdir.h:51:7: note: forward declaration of 'QDirIterator'

      Any idea?

      artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      @ademmler #include <QDirIterator>?

      For more information please re-read.

      Kind Regards,
      Artur

      ademmlerA 1 Reply Last reply
      4
      • artwawA artwaw

        @ademmler #include <QDirIterator>?

        ademmlerA Offline
        ademmlerA Offline
        ademmler
        wrote on last edited by
        #3

        @artwaw thx for reminding me ...

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved