是呀,ctrl+c 没有响应
我在程序中加入了不少printf:
#include <stdio.h>
#include <qapplication.h>
#include <qpushbutton.h>
#include <qlabel.h>
int main(int argc, char *argv[])
{
  printf("before qapp\n");
  QApplication app(argc,argv);
  printf("before label\n");
  //QLabel *btn = new QLabel("Hello Qt!",0);
  QPushButton *btn = new QPushButton("Quit",0);
  QObject::connect(btn,SIGNAL(clicked()), &app,SLOT(quit()));
 printf("before setmain\n");
  app.setMainWidget(btn);
  printf("before show\n");
  btn->show();
  printf("before exec\n");
  return app.exec();
  printf("after exec\n");
}
但COM1只输入before qapp一行,同时也不接受输入,包括ctrl+c.
图形程序本身似乎还活着.
这样程序调试很麻烦,板子只能重新启动,不知如何解决?