dialog.cpp:60:21: error: assigning to 'QPushButton **' from incompatible type 'QPushButton *'
遇到這個問題,但感覺代碼沒什么問題。
代碼如下:
HeadLabel = new QLabel(tr("頭像:"));
HeadIconLabel = new QLabel;
QPixmap icon("312.png");
HeadIconLabel->setPixmap(icon);
HeadIconLabel->resize(icon.width(),icon.height());
UpdateHeadBtn = new QPushButton(tr("更新")); //報錯位置在這里
TopRightLayout = new QHBoxLayout();
TopRightLayout->setSpacing(20);
TopRightLayout->addWidget(HeadLabel);
TopRightLayout->addWidget(HeadIconLabel);
TopRightLayout->addWidget(UpdateHeadBtn);
IntroductionLabel = new QLabel(tr("個人說明:"));
IntroductionTextEdit = new QTextEdit;
uj5u.com熱心網友回復:
UpdateHeadBtn 怎么定義的????轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/159463.html
標籤:C++ 語言
