Drop down lists in QGraphicsWebView
Switching from QWebView to QGraphicsWebVIew the style of the combo box drop-down was lost. I was using the QCleanlooksStyle on my QWebView and when switched to QGraphicsWebVIew I’ve applied the same style to it. I see that the style works ok for most of the elements but the drop-down list doesn’t have the correct applied style. What is the problem with it?
Also if I’ve set the QGraphicsWebView::setResizesToContents(true), and in case if the combo-box is in the bottom of the viewport area of QGraphicsView (where the QGraphicsWebView is shown), it doesn’t popup in upper direction but it popus out to the bottom and most part of the combo box is not being visible. How can I solve this issue?
Switching from QWebView to QGraphicsWebVIew the style of the combo box drop-down was lost. I was using the QCleanlooksStyle on my QWebView and when switched to QGraphicsWebVIew I've applied the same style to it. I see that the style works ok for most of the elements but the drop-down list doesn't have the correct applied style. What is the problem with it?
This sounds like a bug. Could you open a bug report and paste the number here?
Also if I've set the QGraphicsWebView::setResizesToContents(true), and in case if the combo-box is in the bottom of the viewport area of QGraphicsView (where the QGraphicsWebView is shown), it doesn't popup in upper direction but it popus out to the bottom and most part of the combo box is not being visible. How can I solve this issue?
Could you give a test case? I am not sure to understand the problem.
If you are making an interface for a touch-screen device, you probably don’t want to use the combo box’s popup at all. We are making a platform plugin interface for those use cases, if you are interested to work with WebKit trunk, we would appreciate feedback of people experimenting with that.
I’ve opened a bug, here is the url of it: http://bugreports.qt.nokia.com/browse/QTWEBKIT-290 [bugreports.qt.nokia.com]
[edit: fixed link / chetankjain]
WebKit’s bugs should be reported on bugs.webkit.org, not on the bug tracker of Qt. Here is a shortcut to report a bug: http://webkit.org/new-qtwebkit-bug [webkit.org]
Don’t forget to attach a test case, otherwise it is likely to be closed.
Sorry I did not mention it ealier, I thought you knew about that.
Ok, i’ll submit the bug in the webkit.org.
For reproducing the second issue please follow the steps:
- Build and launch the test-case (code is below)
- Scroll down until you should see combo-boxes in the left bottom. Try to align these combo-boxes with the bottom of the GraphicsView.
- Click on the combo-box to open it. You’ll see that it pop’s down (and therefore some part of it is not visible anymore). If you scroll down you’ll see the hidden part of the combo-box. The combo box should at least open up, because it should realize that it’s close to the bottom of the view. In the finger-friendly case, it should not completely expand (because it may be higher than the height of the GraphicsView and therefore not fit in any case). Depenting on QT styles used, it may have scrollbars in such cases, but for example when we use the QCleanlooks style then we don’t even see those scrollbars and it’s completely unusable for touch-screens.
- #include <QApplication>
- #include <QGraphicsScene>
- #include <QGraphicsView>
- #include <QGraphicsWebView>
- #include <QWebSettings>
- #include <QCleanlooksStyle>
- int main(int argc, char **argv)
- QApplication app(argc, argv);
- const int width = 640;
- const int height = 480;
- QGraphicsScene scene;
- QGraphicsView view(&scene);
- QGraphicsWebView webview;
- webview.setStyle(new QCleanlooksStyle());
- webview.page()->setPreferredContentsSize(QSize(width, height));
- view.resize(width, height);
- return app.exec();
Created the same bug in the webkit.org: https://bugs.webkit.org/show_bug.cgi?id=47778 [bugs.webkit.org]
https://bugs.webkit.org/show_bug.cgi?id=47778 [bugs.webkit.org]Created the same bug in the webkit.org:
Please check the bug report, I asked you a question there. :)
Also if possible could you please give some example/documentation of using that “platform plugin interface”, because it would be the ideal case for me:)
There is not doc yet, this is still a feature in development. The idea is that platforms could provide some very specific implementations of features. In the case of combobox for example, you typically don’t want them with touch interfaces, you want a fullscreen selection box for a better user interface (like on Maemo 5).
You’ll find the platform plugin interfaces here: http://gitorious.org/webkit/webkit/blobs/master/WebKit/qt/Api/qwebkitplatformplugin.h [gitorious.org]