Skip to main content
Inspiring
August 12, 2014
Question

Using Qt in a AEGP plugin. QWidget can't get after effects as parent window

  • August 12, 2014
  • 1 reply
  • 1903 views

Hey guys,

     I'm trying to use the qt framework to create a user interface for my AEGP plugin. And I'm running into some problems.

     First, I tried to pass the main HWND into a QWidget, but the QWidget can't seem to recognize it as a parent window. My code looks like this,

    

A_Err err = A_Err_NONE;

AEGP_SuiteHandler suites(basicSuiteP);

HWND handle;

ERR(suites.UtilitySuite5()->AEGP_GetMainHWND(&handle));

qt tt(handle);

tt.show();

qt is a child class inherit from QDialog with a custom constructor

qt::qt(HWND hWand) :QDialog()

{

  create((WId)hWand);

  setModal(true);

}

The qt window did show up, but it can't block user's interaction with after effects' main window. When a QDialog pops up, it will block user's interaction with its parent window until it's closed. But it doesn't seem to work with after effects.

And, I'm wondering, is it possible to add a QWidget to after effects' native panel? For now, my qt window is floating as a separate window. can I  just add my qt widgets into a after effects panel so it can dock into after effects' main window?

This topic has been closed for replies.

1 reply

Inspiring
January 27, 2016

m_pQTApp = new QApplication(d, NULL);

m_pQTApp->setQuitOnLastWindowClosed(false);

m_pQTMainWin = new MainWindow(0);

HWND winHandle = (HWND)m_pQTMainWin->winId();

SetParent(winHandle, parentHandle);

while parentHandle is AEGP_PlatformViewRef