I am trying to develop a navigation application with Qt and Qt location plugins. Right now, I am testing using Here plugin.
Since the Map plugin allows me to set up tilt, bearing, zoomLevel etc. I am well able to do what I am trying to do, except with a flaw in the line that is constructed by RouteModel and MapRoute that is viewed on the screen. The following is how I am able to display the route:
MapItemView {
model: routeModel
delegate: Component {
MapRoute {
route: routeData
line.color: "#d0021b"
line.width: 7
antialiasing: true
smooth: true
}
}
}
As I increase the zoom level and take a closer look at the route, I can see that the route flickers, and on some parts even not very well displayed.
An example of this situation is as follows:
I could see that the picture corrects itself and the flickering stops if I change zoomLevel from around 18 to 10. But this is not what I want since I want the navigation feel. I am looking for better ways to draw this route, simply.
I don't know how to solve this problem and I would appreciate if I could get some advice. Thanks in advance.
EDIT: Added an alternative link to the image
EDIT2: I tried with both Qt 5.8.0 and Qt 5.10.1, with Here map plugin. Step to reproduce would be getting a route map from Dortmund,Germany to Izmir,Turkey, and zooming in with zoomLevel 18, 19 or 20 at Königswall street. (This flickering happens in many occasions, this is just one example to reproduce)
Related
I want to hide the preview widget that is displayed as the last column even when it has no children. I've looked everywhere on the internet and umpteen number of users didn't want the preview widget to be added as the last column all the time.
QColumnView is rolled to empty column
Qt: is it possible to turn off previewWidget in QColumnView?
Is it possible to remove the preview widget from a qt QColumnView?
http://www.qtcentre.org/threads/59917-Columnview-removing-final-column
http://www.qtcentre.org/threads/22566-How-to-turn-off-this-annoying-feature-of-QColumnView
What's more pathetic here is, No solution has been offered till now [From 2010]. Is there any way to get rid of this annoying behaviour? If not, shouldn't the Qt developers provided this option at-least in Qt5? Let me know if I miss something here.
Note: I've tried the possible suggested solutions and none of them worked
Setting the column width to 0 - Failed
Return False for createColumn - createColumn is not at all called when the preview widget is shown
There is no way to do it. In qcolumnview.cpp in QColumnViewPrivate::createColumn(), you have (comments are mine):
if (model->hasChildren(index)) { // Create column when there are children to display
view = q->createColumn(index);
q->connect(view, SIGNAL(clicked(QModelIndex)),
q, SLOT(_q_clicked(QModelIndex)));
} else { // Create column when there are no more children => the column will show the preview widget
if (!previewColumn)
setPreviewWidget(new QWidget(q)); // Indirectly create previewColumn
view = previewColumn;
view->setMinimumWidth(qMax(view->minimumWidth(), previewWidget->minimumWidth()));
}
If you want to change the behavior of the QColumnView so that the preview widget it not always displayed you will have to contribute by fixing it yourself in Qt code and pushing to Qt git repo, or create a suggestion in Qt bug tracker and wait for someone nice to fix it.
I was initially using the provided roles of FolderListModel to display directory content in TableView:
TableViewColumn {
role: "fileName"
title: qsTr("Name")
}
But later I started to define custom delegate for various columns. I noticed that when using roles, the font was very native-looking (on Ubuntu), and I didn't have to explicitly specify color conditioned on styleData.selected, etc. But now with custom delegate, all the native styling is gone, in particular, fonts don't look as smooth anymore. I tried renderType: Text.NativeRendering, but still the result doesn't match the native style, mainly in terms of color and anti-aliasing.
So what is a good way to use the native styling (mainly the font family with optimal anti-aliasing) in delegate?
After a bit of research I wasn't really able to understand why this happens.
In a nutshell, I'm calling QWebView and feeding a .swf into it and it works. However it goes out of its frame/layout, and I'm not sure why.
For a representation, see:
As you may see, the dark greyish rectangle is where QWebView was placed, however the .swf going into it is represented out of it in the top left corner.
How to recreate this problem:
I literally just placed a QWebView using the designer, added all the includes needed etc. and added 3 lines of code to mainwindow.cpp :
QWebSettings *settings = ui->webView->settings();
settings->setAttribute(QWebSettings::PluginsEnabled, true);
ui->webView->load(QUrl("http://www.w3schools.com/html/bookmark.swf"));
I also tried opening an html file with the .swf wrapped in it, but the same problem occurs.
Am I doing something wrong? Is it a known bug? Thanks in advance.
Apparently this is a known bug with Qt, will be fixed next release.
Source: https://bugreports.qt-project.org/browse/QTBUG-33053
What I did to fix was basically compile QT again with the fix included.
I am trying to develop an extension which will show some information(about 15 words) in a small section below the extensions icons in the browser using crossrider?. I searched about it and it seems that browser only supports extensions icons and bookmarks. So is it possible to add such kind of section?? Im new to browser extension development and not sure about its possibility.
The nearest you can get to this is to use a browser action/button and use the tooltip (a.k.a. title) to display the information when the mouse hovers over the button. For example, in your background.js file your code would look something like:
appAPI.ready(function($) {
appAPI.browserAction.setResourceIcon('icons/icon.jpg');
appAPI.browserAction.setTitle('Information displayed on mouse hover');
appAPI.browserAction.onClick(function() {
alert('Hello world!');
});
});
For more information, see appAPI.browserAction.
[Disclosure: I am a Crossrider employee]
Drupal 6 ckeditor 3.6.4
I have page that loads the text area dynamically, so I am using
CKEDITOR.replace('textarea-id');
Which works, but it is bringing in the full toolbar. I would prefer that the simplified toolbar is used, but it would also be acceptable to use the toolbar I have defined if loading the simplified is not possible. Least desirable would be to hard-code the toolbar, but I consider that a last resort. How do I accomplish this?
I have tried
CKEDITOR.replace('textarea-id',
{
toolbar : 'myprofile'
});
Which throws js error: Type x is undefined , I think related to the fact that it cant load the profile. Suggestions?
For better or worse, this is how I did it:
http://joe-riggs.com/blog/2012/11/drupal-ckeditor-load-configuration-settings-on-dynamic-page/