SoQt doesnot shown in other widget

SoQt doesnot shown in other widget

Post by Li Ta » Thu, 01 May 2003 11:57:43



Hi, I am trying to to embed SoQtExaminerViewer into other Qt widget, like
QVBox. The program is built successfully under both windows and linux. I use
nmake to build Qt application. However, the program did not show anything
when it was executed in windows, but everthing works just fine under linux.
The following is my code:

What did I miss in windows? Thanks in advance for your help.

Li

Quote:>>>>>>>>>>>>>>>>>>>>code

#include <iostream.h>
#include <E:/Coin3D/include/Inventor/Qt/SoQt.h>
#include <E:/Coin3D/include/Inventor/Qt/viewers/SoQtExaminerViewer.h>
#include <E:/Coin3D/include/Inventor/nodes/SoBaseColor.h>
#include <E:/Coin3D/include/Inventor/nodes/SoCone.h>
#include <E:/Coin3D/include/Inventor/nodes/SoSeparator.h>
#include <qobject.h>
#include <qapplication.h>
#include <qvbox.h>

int main(int argc, char *argv[])
{
 QApplication a( argc, argv );

    QVBox vb( 0, "Hello", 0 );
  a.setMainWidget( &vb );
    SoQt::init(&vb);

    SoSeparator * root = new SoSeparator;
    root->ref();

 SoBaseColor * col = new SoBaseColor;
 col->rgb = SbColor(1, 1, 0);
 root->addChild(col);

 root->addChild(new SoCone);

    SoQtExaminerViewer * eviewer = new SoQtExaminerViewer(&vb);

    eviewer->setTitle("test");
    eviewer->setSceneGraph(root);
    eviewer->show();

    // Pop up the main window.
    //SoQt::show(&vb);
    //vb->show();

 vb.show();
    // Loop until exit.
    SoQt::mainLoop();

    //return a.exec();

Quote:}

 
 
 

1. Overlaying Motif widgets on a Motif OpenGL drawing area widget

I am trying to overlay Motif option menu widgets on a Motif OpenGL
drawing area widget and am having some difficulties...

Basically, I am drawing a wireframe F-14 using OpenGL into a Motif
OpenGL drawing area widget on my SGI Indy. I want to place Motif option
menus over the weapons station locations (on the wireframe F-14
drawing), and have each option menu contain all valid weapons stores for
that station. However, I cannot get the menus to display over the OpenGL
drawing area (the OpenGL F-14 drawing is always displayed, however). My
widget hierarchy is as follows:

    Form widget #1
        OpenGL drawing area widget
        Form widget #2
            option menu widget
            option menu widget
            ...

I have tried several other widget hierarchies as well, such as getting
rid of Form widget #2 and placing the option menus in Form widget #1...
I cannot make the option menus children of the OpenGL drawing area
widget because it is NOT a composite widget and cannot have children...
Do I need to sync the Motif widget display and OpenGL drawing, even
though I'm not using any Xlib drawing commands?


submit a summary of the responses I receive, along with any solution I
find.

Thank you.
--

Manned Flight Simulator
Naval Air Warfare Center - Aircraft Division
Patuxent River, MD

2. concentric rings

3. Help : glBlend doesnot work ,,, possible causes

4. How do you make a circle in ps5?

5. MPlayer (D3) doesnot fire event

6. Req: Mirror tutorial.

7. SoQt

8. Coin/SoQt and KDevelop (Gideon)

9. making a stripped version of SoQt and SoQtExaminerViewer.

10. SoQt application never quits - problem

11. Retrieving true size of render area (SoQt)

12. QMouseEvent+soqt