#include #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; // Are you root? if(getuid() != 0) { QMessageBox::critical(NULL, QObject::tr("Root privileges needed"), QObject::tr("You must run arpinfo as a root."), QMessageBox::Ok, QMessageBox::Ok); fprintf(stderr, "You must run arpinfo as a root.\n"); exit(1); } w.show(); return a.exec(); }