简体   繁体   中英

error: 'QTabWidget::QTabWidget(const QTabWidget&)' is private

I develop a program and I have 10 backups of it. I added some lines to it and when I compiled the project and now it has the following error:

C:\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtWidgets\qtabwidget.h:173: error: 'QTabWidget::QTabWidget(const QTabWidget&)' is private

the error is from * line

namespace Ui {
  class ContentControl;
}

class ContentControl : public QTabWidget // * from this line
{
    Q_OBJECT

public:
.
.
.
}

All backups have this error now. Any idea why? I re-installed Qt but the problem is still present.

You cannot create a copy of a QTabWidget object. Somewhere in your code you are calling the copy constructor of QTabWidget which is not allowed as it is declared private in the Qt source code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM