Error in Qt Creator 5.9 ; use of deleted function 'Blob::Blob(const Blob&)'



  • I am currently dealing with these errors. I am not sure where I did wrong since they are from qobject.h
    I am using Qt Creator 5.9 on Windows.

    The errors :

    1. C:\Qt\Qt5.9.0\Tools\mingw530_32\i686-w64-mingw32\include\c++\ext\new_allocator.h:120: error: use of deleted function 'Blob::Blob(const Blob&)'
      { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      ^
    2. C:\Qt\Qt5.9.0\5.9\mingw53_32\include\QtCore\qscopedpointer.h:175: error: 'QScopedPointer<T, Cleanup>::QScopedPointer(const QScopedPointer<T, Cleanup>&) [with T = QObjectData; Cleanup = QScopedPointerDeleter<QObjectData>]' is private
      Q_DISABLE_COPY(QScopedPointer)
      ^

  • Qt Champions 2017

    Hi
    It says use of deleted function
    Blob::Blob(const Blob&)
    In plain english it means "Hey you try to copy an QObject which is not allowed"
    (the copy constructor have been deleted on purpose)

    So if Blob is a QObject, you somehow ask it to make a copy.
    (inserting into list or by other means)


  • Moderators

    @Syazwany

    To add to @mrjj you are not using Qt creator 5.9. You are using Qt 5.9 libraries probably pre-compiled with MinGW.

    Qt creator is an IDE and may use many different Qt library versions.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.