bool OpenGLUtils_FrameBuffer::init(const GLsizei& xSize, const GLsizei& ySize)
{
char* ext = (char*) glGetString(GL_EXTENSIONS);
+ if (!ext)
+ return false;
if (!IsEXTInitialized || strstr(ext, "GL_EXT_framebuffer_object") == NULL) {
//qDebug( "Initializing OpenGL FrameBuffer extension failed");
return false;
myWindowBar = new ViewerToolbar(this, myViewPort);
myWindowBar->setCursor(Qt::PointingHandCursor);
aToolLay->addWidget(myWindowBar);
- myWindowBar->setFixedWidth(100);
myMinimizeBtn = new QAction(myWindowBar);
myMinimizeBtn->setIcon(MinimizeIco);
{
}
+
+//****************************************************************
+void XGUI_ViewWindow::showEvent(QShowEvent* theEvent)
+{
+ QFrame::showEvent(theEvent);
+ myWindowBar->setFixedSize(myWindowBar->sizeHint());
+}
+
//****************************************************************
void XGUI_ViewWindow::changeEvent(QEvent* theEvent)
{
virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
+ virtual void showEvent(QShowEvent* theEvent);
+
private slots:
void onClose();
void onMinimize();
{
setBackgroundRole(QPalette::NoRole);
setAttribute(Qt::WA_NoSystemBackground);
- setAttribute(Qt::WA_PaintOnScreen);
+ //setAttribute(Qt::WA_PaintOnScreen);
setAutoFillBackground(false);
}
{
setBackgroundRole(QPalette::NoRole);
setAttribute(Qt::WA_NoSystemBackground);
- setAttribute(Qt::WA_PaintOnScreen);
+ //setAttribute(Qt::WA_PaintOnScreen);
setAutoFillBackground(false);
}
/*!
Emit activated for view \a view.
*/
-static int AA = 0;
void XGUI_Viewer::onWindowActivated(QMdiSubWindow* view)
{
- qDebug("### windowActivated %i\n", AA++);
if (view && (view != myActiveView)) {
myActiveView = view;
((XGUI_ViewWindow*)myActiveView->widget())->windowActivated();