Solved

Unknown module(s) in QT: webkitwidgets

Posted on 2015-02-23
7
2,365 Views
Last Modified: 2015-02-23
Error while building project in Qt.
Code in my .pro file
 QT += network webkitwidgets

Open in new window


:-1: error: Unknown module(s) in QT: webkitwidgets

Generally, I need to add build this

http://qt-project.org/doc/qt-4.8/webkit-webftpclient.html

My qt is 5.0.2 is that a problem?
0
Comment
Question by:Nusrat Nuriyev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 500 total points
ID: 40626216
The version is fine - but: Do you have WebKit installed (and built)? It's been a year or two since I last worked with WebKit, but IIRC it is not included in the setup/build process by default. See https://trac.webkit.org/wiki/BuildingQtOnLinux and the subsection "Building WebKit" on that.
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40626295
Yeap, when you work with new technology 97% of time is spend on building not programming :)
That's known issue.

root@nusik-PC:/tmp# git clone git://gitorious.org/webkit/webkit.git
Cloning into 'webkit'...
remote: Counting objects: 2233225, done.
remote: Compressing objects: 100% (410870/410870), done.

Open in new window


Do I need to download 6 GB(with 2 mln files) in order to compile a few lines?
:)
0
 
LVL 86

Expert Comment

by:jkr
ID: 40626524
If you try to go 'slim', Qt is the wrong route anyway, the runtime libs alone are *huge*. If your goal is to download files using FTP, why not using cURL (or, to be specific, libcurl)? http://curl.haxx.se/libcurl/
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Nusrat Nuriyev
ID: 40626595
I've got you.
The requirement is crossplatform GUI.

I have recently worked with curl :)
By the  way,  could you make code review of this source code?
http://programmist.az/getting-currency-rates-from-central-bank/
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 40626695
>>The requirement is crossplatform GUI.

OK, that's a good reason to use Qt - but not without mentioning wxWidgets (http://wxwidgets.org/) as well.

>>By the  way,  could you make code review of this source code?

Sure, looks OK overall, only small things to criticise:

- in 'get_currency_rate_from_xml()' you're mixing both 'cerr()' and 'stderr', I assume you forgot to change the latter.

- 'get_currency_rate_from_xml()' is declared to return an 'int', yet it in fact not all control paths return a value. It's only '-1' on failure, but no value is returned on success. The compiler should issue an error here.

- in 'main()':

            if (res != CURLE_OK)
            {
                fprintf(stderr, "curl_easy_perform() failed: %s\n",
                                curl_easy_strerror(res));
                in.close();
                out.close();
                fclose(bodyfile);
                fclose(headerfile);
                curl_easy_cleanup(curl);
 
            }
            else
            {
                usleep(500500);
                fclose(bodyfile);
                fclose(headerfile);
                curl_easy_cleanup(curl);
                double drate = 0;
 
                get_currency_rate_from_xml(bodyfilename.c_str(), drate, "UAH");
                cout << ratecount++ << ": " << cur_date << " " << drate << endl;
                out << cur_date << " " << drate << endl;
            }

Open in new window


could be rewritten as

            if (res != CURLE_OK)
            {
                fprintf(stderr, "curl_easy_perform() failed: %s\n",
                                curl_easy_strerror(res));

                curl_easy_cleanup(curl);
            }
            else
            {
                usleep(500500);
                curl_easy_cleanup(curl);
                double drate = 0;
 
                get_currency_rate_from_xml(bodyfilename.c_str(), drate, "UAH");
                cout << ratecount++ << ": " << cur_date << " " << drate << endl;
                out << cur_date << " " << drate << endl;
            }

            in.close();  // not really needed, the destructor will do that
            out.close();  // not really needed, the destructor will do that
            fclose(bodyfile);
            fclose(headerfile);

Open in new window


- general: I tend to always initialize pointers to 'NULL' when they're declared. Pro: No weird behaviour, always a segfault when hit. Con: 5 more characters to type ;o)
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40626724
Thank you :)
Con: 5 more characters to type ;o)
you have forgotten to mention two spaces :D
0
 
LVL 86

Expert Comment

by:jkr
ID: 40627324
Yes, but they are optional ;o)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to debug Angular JS in Visual Studio 2013 2 295
C++ Class Serialization, Encapsulation and Formatted Output 8 109
CKEditor - will not function 7 81
visual C++ 1 39
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question