Eskil,

I've altered the code to reproduce the problem, and I think I've found 
out what's going wrong...

I'm working with the 4.4 preview version. Because of this I had to add 
the static part in my class for loading the correct libraries (see 
code).

I'm working on Windows XP with a screen resolution of 1152 by 864 
pixels. The program that I'm writing has to work on a screen with HD 
resolution (1920 x 1080 pixels). So I altered the code that the size 
of my web view has HD dimensions. When I display the webpage I've 
entered in my code, the page should be centered in the view, but it 
isn't. It seems that the maximum width of my QWebView is the screen 
resolution (1152 px) instead of HD width (1920 px).

Can you check if this is also the behavior on your machine?

/Dimitri


This is the code with which you can reproduce the problem:

/* BEGIN OF CODE */
import com.trolltech.qt.core.QUrl;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QGraphicsScene;
import com.trolltech.qt.gui.QGraphicsView;
import com.trolltech.qt.webkit.QWebView;

public class WebViewInGraphicsView extends QGraphicsView {

        // FIXME : Remove in Qt Jambi 4.4 (bug - library not loaded in 
Windows)
        static {
                com.trolltech.qt.Utilities.loadQtLibrary("QtCore");
                com.trolltech.qt.Utilities.loadQtLibrary("QtNetwork");
        }

        public WebViewInGraphicsView() {
                QWebView view = new QWebView();
                view.setGeometry(0, 0, 1920, 1080);
                view.load(new QUrl("http://www.basketgrootleuven.be";));

                QGraphicsScene scene = new QGraphicsScene();
                scene.addWidget(view).setVisible(true);

                setScene(scene);
        }

        public static void main(String args[]) {
                QApplication.initialize(args);

                WebViewInGraphicsView v = new WebViewInGraphicsView();
                v.show();

                QApplication.exec();
        }
}
/* END OF CODE */




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

Reply via email to