mhlabriola
New Member
Hi,
I am trying to create a dock that will dock instead of just float. From looking at the documentation, there is an API call that should do it:
QDockWidget *dock = new QDockWidget("My Dock");
QTextEdit *field = new QTextEdit();
field->setText("My Field");
dock->setWidget(field);
obs_frontend_add_dock(dock);
This creates a dock that I can open, but it only floats and won't dock. I have looked at the code for the other docks and that codes makes calls directly into UI modules instead of using the obs_frontend_add_dock API. I have seen other people get this working by copying some of the UI code into their plugin, but that code looks a lot like what's built into the obs_frontend_add_dock API call. Am I missing something simple?
I am trying to create a dock that will dock instead of just float. From looking at the documentation, there is an API call that should do it:
QDockWidget *dock = new QDockWidget("My Dock");
QTextEdit *field = new QTextEdit();
field->setText("My Field");
dock->setWidget(field);
obs_frontend_add_dock(dock);
This creates a dock that I can open, but it only floats and won't dock. I have looked at the code for the other docks and that codes makes calls directly into UI modules instead of using the obs_frontend_add_dock API. I have seen other people get this working by copying some of the UI code into their plugin, but that code looks a lot like what's built into the obs_frontend_add_dock API call. Am I missing something simple?