Hello!

I'm a relatively new Qt Jambi user. I've been ramping up over the last few
days, but I've run into a problem that I can't seem to get around.

Here is the code:

----8<----

package com.quigley.qt.editor;

import com.trolltech.qt.gui.*;

public class Editor extends QMainWindow {
        protected QStatusBar statusBar;

        public Editor() {
                QGraphicsScene scene = new QGraphicsScene();
                scene.addText("Hello World");

                QGraphicsView view = new QGraphicsView(scene);
                this.setCentralWidget(view);

                statusBar = new QStatusBar();
                this.setStatusBar(statusBar);
        }

        public static void main(String[] args) {
                QApplication.initialize(args);
                Editor editor = new Editor();
                editor.show();
                QApplication.exec();
        }
}

----8<----

When I run this, I see the text "Hello World" get painted onto the
QGraphicsView, but then it's immediately overwritten with plain white.

This is a simplified version of a more complex program. The more complex
program has scrollbars on the QGraphicsView (the scene is larger) and more
complicated elements in the scene (a bunch of QGraphicsEllipseItem
subclasses). The bigger version exhibits the same problem--the view
displays the scene and then it's immediately overwritten with plain white,
and the scrollbars disapppear.

Any insight would be greatly appreciated. I'm hoping this is something
silly that I'm doing and not a Qt Jambi bug.

For what it's worth, this same code runs fine on another system, but after
a short while of interacting with the view, it gets replaced with white.

Both environments are virtualized Ubuntu 8.04 (32-bit) instances (one
using VirtualBox and the other using VMWare Fusion).

Thanks in advance!
Michael

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to