本文整理汇总了C++中MyWidget类的典型用法代码示例。如果您正苦于以下问题:C++ MyWidget类的具体用法?C++ MyWidget怎么用?C++ MyWidget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MyWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv); // 构造一个 QApplication 对象
MyWidget wdg; // 构造一个 MyWidget 对象
wdg.show(); // 让窗口成为显示状态
return app.exec(); // 启动主事件循环
}
示例2: main
int main(int argc, char *argv[])
{
mainWorkspace.clear();
std::cout << "Inhaler GUI Version: " << VERSION_NUMBER << " started." << std::endl;
ros::init (argc, argv, "inhaler_gui_server");
QApplication app(argc, argv);
MyWidget widget;
Line l(100,100,210,200);
lines.push_back (l);
//ROS subscribing
ros::NodeHandle n;
ros::Subscriber lineSub = n.subscribe ("inhalerGUI_Line",1000,addLine);
ros::Subscriber textSub = n.subscribe ("inhalerGUI_Text",1000,addText);
ros::Subscriber clearSub = n.subscribe ("inhalerGUI_Clear",1000,clearGUI);
widget.show();
ros::AsyncSpinner spinner(4); // Use 4 threads
spinner.start();
//ros::waitForShutdown();
app.exec();
//app.exec();
return 0;
}
示例3: main
int main(int argc, char **argv)
{
QApplication a(argc, argv);
MyWidget w;
w.show();
return a.exec();
}
示例4: main
int main( int argc, char * argv[ ] ) {
QApplication app( argc , argv ) ;
MyWidget window ;
window.setWindowTitle( QApplication::translate( "greyScales" , "grey scales demonstration" ) ) ;
window.show( ) ;
return app.exec( ) ;
}
示例5: main
int main(int argc, char *argv[]) {
#ifndef WIN32
XInitThreads();
#endif
QApplication app(argc, argv);
MyWidget *window = new MyWidget;
//see my_widget.h for controller and cache creation
window->show();
window->update();
QTimer *timer = new QTimer(window);
QObject::connect(timer, SIGNAL(timeout()), window, SLOT(update()));
timer->start(2000);
QTimer *timer1 = new QTimer(window);
QObject::connect(timer1, SIGNAL(timeout()), window, SLOT(updateGL()));
timer1->start(20);
QTimer *timer2 = new QTimer(window);
QObject::connect(timer2, SIGNAL(timeout()), window, SLOT(close()));
timer2->start(20000);
app.exec();
timer->stop();
timer1->stop();
timer2->stop();
QTest::qWait(2000);
qDebug("main program calling destruction");
return 0;
}
示例6: main
int main(int argc, char *argv[]){
QApplication app(argc,argv);
MyWidget widget;
widget.show();
return app.exec();
}
示例7: main
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
QApplication app(argc, argv);
MyWidget mywidget;
mywidget.show();
return app.exec();
}
示例8: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget widget;
widget.setGeometry(100, 100, 500, 355);
widget.show();
return app.exec();
}
示例9: MyWidget
void ShowQADialog::on_ExitButton_clicked()//退出按钮操作
{
MyWidget *my = new MyWidget();
my->show();
this->close();
UserFocusList.clear();
AnswerPriseList.clear();
}
示例10: main
int main(int argc, char** argv)
{
CuteApp app(argc, argv);
MyWidget widget;
widget.show();
return app.exec();
}
示例11: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
MyWidget w;
w.show();
return a.exec();
}
示例12: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget widget;
app.setMainWidget(&widget);
widget.show();
qWarning("this is an OpenGL application for drawing streamline placements");
return app.exec();
}
示例13: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv); // 构造一个 QApplication 对象
MyWidget wdg; // 构造一个 QWidget 对象
Ui::MyWidget ui; // 构造一个 Ui::MyWidget 对象
ui.setupUi(&wdg); // 设置界面
wdg.show(); // 让窗口成为显示状态
return app.exec(); // 启动主事件循环
}
示例14: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MyWidget w;
w.show();
w.activateWindow();
return a.exec();
}
示例15: main
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MyWidget w;
w.resize(200, 500);
w.show();
return a.exec();
}