Hi,
they are available through the entire lifetime of the application (the tabs are stored per layout in a QList<std::shared_ptr>. I have one Q_INVOKABLE method that returns a pointer to the tab.
Q_INVOKABLE ViewManagerTabQMLInterface* getTab(int index);
//--------------------------------------------------------------------------------------
/// Returns the tab model from the given index.
//--------------------------------------------------------------------------------------
ViewManagerTabQMLInterface* ViewManagerQMLInterface::getTab(int index)
{
if(index >= 0 && index < (int)_tabsList.size())
{
return _tabsList[index].get();
}
return NULL;
}
Q_INVOKABLE ViewManagerTabQMLInterface* getTab(int index);
//--------------------------------------------------------------------------------------
/// Returns the tab model from the given index.
//--------------------------------------------------------------------------------------
ViewManagerTabQMLInterface* ViewManagerQMLInterface::getTab(int index)
{
if(index >= 0 && index < (int)_tabsList.size())
{
return _tabsList[index].get();
}
return NULL;
}
To copy to clipboard, switch view to plain text mode
I see that at one point the destructor of the ViewManagerTabQMLInterface is called after a QDeleteDefferedEvent (just reading from the call stack).
MeshingMaster.exe!ViewManagerTabQMLInterface::~ViewManagerTabQMLInterface() Line 69 C++
[External Code]
Qt5Cored.
dll!qDeleteInEventHandler
(QObject * o
) Line
4482 C
++ Qt5Widgetsd.
dll!QApplicationPrivate
::notify_helper(QObject * receiver,
QEvent * e
) Line
3799 C
++ Qt5Cored.
dll!QCoreApplicationPrivate
::sendPostedEvents(QObject * receiver,
int event_type, QThreadData
* data
) Line
1649 C
++ Qt5Cored.dll!QEventDispatcherWin32::sendPostedEvents() Line 1295 C++
qwindowsd.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Line 82 C++
Qt5Cored.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned __int64 wp, __int64 lp) Line 445 C++
[External Code]
Qt5Cored.
dll!QEventDispatcherWin32
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
) Line
845 C
++ qwindowsd.
dll!QWindowsGuiEventDispatcher
::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
) Line
74 C
++ Qt5Cored.
dll!QEventLoop::processEvents(QFlags<enum
QEventLoop::ProcessEventsFlag> flags
) Line
135 C
++
MeshingMaster.exe!ViewManagerTabQMLInterface::~ViewManagerTabQMLInterface() Line 69 C++
[External Code]
Qt5Cored.dll!qDeleteInEventHandler(QObject * o) Line 4482 C++
> Qt5Cored.dll!QObject::event(QEvent * e) Line 1255 C++
Qt5Widgetsd.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 3799 C++
Qt5Widgetsd.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 3159 C++
Qt5Cored.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 988 C++
Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event) Line 231 C++
Qt5Cored.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1649 C++
Qt5Cored.dll!QEventDispatcherWin32::sendPostedEvents() Line 1295 C++
qwindowsd.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Line 82 C++
Qt5Cored.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned __int64 wp, __int64 lp) Line 445 C++
[External Code]
Qt5Cored.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 845 C++
qwindowsd.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 74 C++
Qt5Cored.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 135 C++
Qt5Cored.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 210 C++
Qt5Cored.dll!QCoreApplication::exec() Line 1261 C++
To copy to clipboard, switch view to plain text mode
Any idea?
Bookmarks