Trolltech Home | Qt-solutions Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-solutions Archive, December 2007
QWidget in CMDIChildWnd


Message 1 in thread

hi,

i have a custom widget derived from the standart QWidget:
class QDatChildMenuBar : public QWidget

This widget should be shown in a CMDIChildWnd as an extension toolbar on 
one side of the MDI window.
Inside the MDI window, my widget is created by:

QWinWidget *wRight = new QWinWidget(this->GetSafeHwnd());
wRight->showCentered();
m_pQMenuBarRight = new QDatChildMenuBar(wRight);
m_pQMenuBarRight->show();

My problem is, that the widget doesn't show up. It is created 
successfully and i can also access its internal methods and members.
The constructor:
QDatChildMenuBar::QDatChildMenuBar(QWidget * parent) : QWidget(parent)

I can force my widget to be shown when i pass some WindowFlags into the 
constructor like this:
QDatChildMenuBar::QDatChildMenuBar(QWidget * parent) : QWidget(parent, 
Qt::Window | Qt::FramelessWindowHint)

But in that case, my widget seems to be created in a dialog-like way 
since it always stays on top of the MFC-MDI windows which is not acceptable.

Does anybody know, how i can show the widget without passing the 
"Qt::Window" flag to the constructor?


-- 
 [ signature omitted ]