Why Qt remove QFtp library start from Qt5? - c++

I just want to know why Qt remove QFtp start from Qt version 5.
Of course I can still install QtFtp manually on Qt5 but I cannot find any official answer about why they remove this library. For now, I should use QNetworkAccessManager, but it's having limited feature.
Thank you!
Edit:
More explanation about this sentence "... I should use QNetworkAccessManager, but it's having limited feature."
For example, I can get list of the content from FTP server using QtFtp, but I cannot do this with QNetworkAccessManager.

Related

Add GUI to a QT Project with Arduino

So here is my question I have been trying to create a small "software" which would control my arduino card. For this I decide to use qt so I used this tutorial to add arduino to qt :
http://www.lucidarme.me/?p=3287
I am very sorry the page is only in French. I basicly get 3 files config files and includes for my arduino. And a Makefile. The problem I have is that I want to add GUI such as Windows but whenever I add a gui file to my project it says it cannot find the "QMainWindow". However I think the problem is deeper and that it doesn't find any Qt class.
I think this is because I don't have any pro files but I tried adding one and it didn't work. I hope you guys understood my problem I am very new to QT ...
Thank you !
The GUI project is completely unrelated to anything Arduino. The page you linked to shows how to use Qt Creator as an IDE to work on Arduino projects, as a replacement to the Arduino IDE. This has nothing to do with GUIs or Qt, you'd be reusing Qt Creator as a general-purpose IDE that it is.
What you need and want is to create a standard Qt project in Qt Creator and go from there. You can also leverage Qt to "simulate" Arduino code without running real Arduino hardware, see this answer for an example.

How to open a .pdf file from QML?

Is there any way to open a .pdf file from QML or I have to do it in C++ via QDesktopServices , and if I used QDesktopServices would it work without any problem in Android.
Thanks.
Is there any way to open a .pdf file from QML or I have to do it in C++ via QDesktopServices
The only thing I am aware of is the following:
Qt.openUrlExternally("http://stackoverflow.com/questions/23001582/how-to-open-a-pdf-file-from-qml/23002658");
Based on the comments, it seems to work on Android
In your particular case, it would become:
Qt.openUrlExternally("path/to/my/foo.pdf");
and if I used QDesktopServices would it work without any problem in Android
The question lacks a question mark, but nitpicking aside, this oughta work. This bug was also fixed in Qt 5.2.0. That is why I asked about the version, but other than this, I am not aware of any other critical issues:
QDesktopServices::openUrl crashes Application
You can do this from QML using the V-Play FileUtils: https://v-play.net/doc/fileutils/
fileUtils.openFile("<path to pdf file>")
Here is an example code that downloads a PDF from the web and opens it using the default application on Android and iOS: https://v-play.net/web-editor/?snippet=ce64a995

How to use QtWebview for Google Maps

Basically I want to use it for googlemaps but at the moment I can't even get it to compile a simple web page.
I'm using the latest version of Qt creator but the documentation just seems out of date
i have dragged the widget onto my form and set its url to google.com (just for testing purposes)
and when i hit compile i get loads of unresolved external symbol errors, I don't know what to include to use this I just assumed drag and drop the widget and I'm good to go, however this isn't the case.
Any ideas?
EDIT: For Qt 4.x, this is what you do:
Go into your .pro file and include the right module for QtWebKit.
http://qt-project.org/wiki/QtWebKit
QT += webkit
And here is an example you can find in the welcome pages of Qt Creator if you want more:
http://qt-project.org/doc/qt-4.8/webkit-fancybrowser.html
Good luck; hope that helps. And btw, I just tested it with Google Maps, and it renders fine with Qt 4.8.4 on Win 7.
EDIT: For Qt 5.x+, this is what you do:
QT += webkitwidgets
Like it shows in the .pro file of any of the examples here:
http://qt-project.org/doc/qt-5.0/qtwebkitexamples/webkitwidgets-browser-browser-pro.html
http://qt-project.org/doc/qt-5.0/qtwebkitexamples/qtwebkitexamples-index.html
And you may want to consider also adding the network module in the pro file, too.
Ok so iv seen the QT +=webkit solution all over the place which for the record doesnt work if you have just dragged a dropped a webview into a widget using qt designer.
the solution i finally found that worked was
QT+=webkitwidgets
all working now thought id answer my own question after solving it to help anyone else who might be having the same problem

using qt creator only as editor: are qt libraries necessary

I want to use qt creator, only as an editor, which does code completion and finds declarations etc. I dont want to use it to build etc. Is there a way, I can circumvent the need of qt-libraries? I am using a server, where my file space is limited. Also, without qt libraries, it does not allow making even a project. When I tried to install qt-libraries, it configures fine, but on make gives error.
So, can you suggest an alternative? Thanks
No, you need the Qt libs because the editor was coded in Qt.
Actually - at least under Windows -, you can. You just have to deselect all Qt library versions and only select the editor. If you want to have a debugger available on Windows, also select the checkbox for CDB support.
I have forgotten how this works with the Linux installer, but I imagine the same applies there as well, except of course for the CDB debugger, which is not available on Linux. Instead you should be able to chose from GDB and some other alternatives, though it might not be during the installation.
Once you installed it and are about to set up a new "Plain C++" project, you can't select a Qt version when creating a new kit, obviously.
If you blindly selected an already existing kit, Qt Creator might have tried to use a Qt installation for your vanilla C++ project. Instead of doing so, you should click the "Manage..." button on one of your preexisting kits and add a new, custom kit. Here you can set the "Qt version" option to "None". The rest should be set according to your needs.

Eclipse like FilteredTree for Qt?

I'm new to Qt (using Qt SDK with Qt Creator) and in the process of creating a GUI. What I'm looking for is a FilteredTree like the one found in the Preferences of Eclipse. Is there something "ready to use" out there? I've tried all search queries I can think of but no results so far.
In case it matters I'm absolutely willing to update to the newest Qt version.