Integrating a Qt Widget in a plugin
Posted: Fri Jul 21, 2017 3:42 pm
Hi all,
I'm really new to Qt and CC and I developed a little Qt application with my own class just opening a window with some widget inside, alone it works fine with just the following main :
// Create the Qt app
QApplication app(argc, argv);
// Create my own window
MyWidget window;
window.show();
return app.exec();
something very basic.
And I was wondering how to include that in a CC plugin.
I followed the tutorial and recompiled CC and my new plugin appears in the list when CC is launched but after nothing happened except for the default dummy plugin actions.
I didn't succeed too in calling just a basic Qt widget from the doAction function this way :
QWidget fenetre((QWidget*)m_app->getMainWindow());
fenetre.setFixedSize(300, 150);
fenetre.show();
Is it the right way to do it or there are some changes to do in my class to display directly a Qt window ?? Or it is impossible ??
Sorry for the long post and thanks for your help.
Clement
I'm really new to Qt and CC and I developed a little Qt application with my own class just opening a window with some widget inside, alone it works fine with just the following main :
// Create the Qt app
QApplication app(argc, argv);
// Create my own window
MyWidget window;
window.show();
return app.exec();
something very basic.
And I was wondering how to include that in a CC plugin.
I followed the tutorial and recompiled CC and my new plugin appears in the list when CC is launched but after nothing happened except for the default dummy plugin actions.
I didn't succeed too in calling just a basic Qt widget from the doAction function this way :
QWidget fenetre((QWidget*)m_app->getMainWindow());
fenetre.setFixedSize(300, 150);
fenetre.show();
Is it the right way to do it or there are some changes to do in my class to display directly a Qt window ?? Or it is impossible ??
Sorry for the long post and thanks for your help.
Clement