PDA

View Full Version : Insert separate QToolBar into QMainWindow



YuriyRusinov
24th April 2006, 10:24
Hello, All !

I have to insert QToolBar into QMainWindow. I saw algorithm, all text
and image data gathered into QMimeData object and setParent ( MainForm*
) for QToolBar and I have some questions:
1. Which way I can recognize what widgets are contained by QToolBar ?
2. What event handlers must be reimplemented in QToolBar and QMainWindow classes ?

wysota
24th April 2006, 10:28
Hello, All !

I have to insert QToolBar into QMainWindow. I saw algorithm, all text
and image data gathered into QMimeData object and setParent ( MainForm*
) for QToolBar and I have some questions:
1. Which way I can recognize what widgets are contained by QToolBar ?
2. What event handlers must be reimplemented in QToolBar and QMainWindow classes ?

What do you mean here? Wouldn't using QMainWindow::addToolbar() be what you want?

YuriyRusinov
24th April 2006, 10:59
I have main window application and separate toolbar from third party library, I want to add this toolbar into main window by mouse moving in runtime to appropriate toolbar area using drag and drop technique.

wysota
24th April 2006, 11:37
This might not be possible or at least not easy. It would involve embedding the external window into a Qt widget. And it would still be an external application, as Qt works with QWidget derived widgets only.