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?
-
[quote author="HaykG" date="1287131496"]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?[/quote]
This sounds like a bug. Could you open a bug report and paste the number here?
[quote author="HaykG" date="1287131496"]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?[/quote]
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":http://bugreports.qt.nokia.com/browse/QTWEBKIT-290
[edit: fixed link / chetankjain]
-
[quote author="HaykG" date="1287310827"]I've opened a bug, here is the url of it: http://bugreports.qt.nokia.com/browse/QTWEBKIT-290.[/quote]
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":http://webkit.org/new-qtwebkit-bug
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);
view.setFrameShape(QFrame::NoFrame);
QGraphicsWebView webview;
webview.setStyle(new QCleanlooksStyle());
webview.setResizesToContents(true);
webview.page()->setPreferredContentsSize(QSize(width, height));
webview.load(QUrl("http://www.google.de/language_tools?hl=de"));
scene.addItem(&webview);
view.resize(width, height);
view.show();
return app.exec();
}@
-
Created the same bug in the webkit.org: "https://bugs.webkit.org/show_bug.cgi?id=47778":https://bugs.webkit.org/show_bug.cgi?id=47778
-
[quote author="HaykG" date="1287317765"]Created the same bug in the webkit.org: "https://bugs.webkit.org/show_bug.cgi?id=47778":https://bugs.webkit.org/show_bug.cgi?id=47778[/quote]
Please check the bug report, I asked you a question there. :)[quote author="HaykG" date="1287321858"]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:)[/quote]
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":http://gitorious.org/webkit/webkit/blobs/master/WebKit/qt/Api/qwebkitplatformplugin.h