انجمنهای فارسی اوبونتو
کمک و پشتیبانی => برنامهسازی => نویسنده: adel1368 در 04 بهمن 1391، 09:34 بظ
-
دوستان من این خط کد رو نوشتم خطا میده ایرادش از چی:
#include <QApplication>
#include <QPushButton>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPushButton *button=new QPushButton("Quit");
QObject::connect(button,SIGNAL(clicked()),quit,SLOT(quit()));
button ->show();
return a.exec();
}
باید یک دکمه نشون بده ولی این خطا رو میده:
9: error: 'quit' was not declared in this scope
-
خط نهم توی conncet بجای quit باید از &a استفاده کنی.
اگر فقط همین یک ارور داده باشه!