tags:

views:

50

answers:

1

I send the url to find the page what I need. Hovewer there is a misunderstanding with google.

QString baseurl("http://blogsearch.google.com/blogsearch?hl=tr&ie=UTF-8&q=C++");

I send searched string q=C++; but google search the string only C, it does not search C++. What to do for change the searching key C to C++ ?

A: 

Try passing at least the query part of the url to QUrl::toPercentEncoding.

Even better, try:

QUrl url("http://blogsearch.google.com/blogsearch");
url.addQueryItem("hl", "tr");
url.addQueryItem("ie", "UTF-8");
url.addQueryItem("q", "c++");
QByteArray baseurl = url.toEncoded();
sje397
it doesn't make any change in search result. It still search only include C, not C++.
sheman
sje397
Same goes for blogsearch :)
sje397
I get typed directly into codes but the result same :( it doesn't change.
sheman
It seems the problem is not related to this bit of code. Maybe you can post some of the other stuff?
sje397
I do it like that;QUrl url = QUrl::fromEncoded("http://blogsearch.google.com/blogsearch?hl=tr url.addQueryItem("num", "1"); url.addQueryItem("start" ,QString::number(randomValue)); view->load(url);
sheman
Can you perhaps do a `qDebug() << url;` or something and see that it has not decoded your url?
sje397