Mouse Double click problemm
hi,
i had taken to classes
QMianwindow and Qwidget..
Qmainwindow is mainApplication and Qwidget is another class....
Qwidget is framesless widget ...showing top on main application....
m_pCameraWidget = new CameraWidget(this); // was declared in main application constructuor // Qwidget class name as m_pCameraWidget i has given.....
// in camera Qwidget i has given
void CameraWidget::mouseDoubleClickEvent(QMouseEvent *event)
{
if(!isMaximized())
{
showMaximized();
}
else
{
showNormal();
}
}
m_pCameraWidget = new CameraWidget(this); // when i declare in mainwindow constructor it is not working
m_pCameraWidget = new CameraWidget(); // when i declare in mainwindow constructor it is working
why can anybody give solution with code ....
Re: Mouse Double click problemm
Quote:
Originally Posted by
mouni
m_pCameraWidget = new CameraWidget(this); // when i declare in mainwindow constructor it is not working
m_pCameraWidget = new CameraWidget(); // when i declare in mainwindow constructor it is working
A QWidget without a parent (second case) becomes a top level window, if you pass a parent (first case) it is part of the parent's window.
Only widgets that are window types (e.g. QMainWindow, QDialog, QMenu) show as a separate window even when they have a parent.
Cheers,
_