Message 1 of 5
Embed external application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I am trying to embed as external application inside 3ds Max through Qt dialog in our plugin.
This is working fine, but issue is, i am not able to see the Title and Menu bar of that external application.
Here is the code what i am trying.
QWindow* window = QWindow::fromWinId(hWnd);
QWidget* container = QWidget::createWindowContainer(window);// , centralWidget);
QMdiSubWindow* subWindow = new QMdiSubWindow(this);
subWindow->setWidget(container);
subWindow->setAttribute(Qt::WA_DeleteOnClose);
subWindow->setWindowTitle("Program 1");
subWindow->setWindowState(Qt::WindowMaximized);
Qt::WindowFlags flags = subWindow->windowFlags();
flags |= Qt::FramelessWindowHint;
flags |= Qt::WindowSystemMenuHint;
subWindow->setWindowFlags(flags);
container->show();
QHBoxLayout* buttonLayout = new QHBoxLayout(this);
buttonLayout->addWidget(container);
QVBoxLayout* mainLayout = new QVBoxLayout(this);
//// ... add other widgets ...
mainLayout->addLayout(buttonLayout);
mainLayout->addStretch();
setLayout(mainLayout);
in Qt, they are saying no option to show the menu.
i tried the other way without using Qt (using SetParent), in that method, its showing menu and title bar. But issue is, whenever a dialog is opened in the external application, then this embedded dialog is getting hidden. and click on viewport again, its showing again.
Is there any other way to implement this ? Please suggest.
Regards,
Gopinath.