?
Solved

Unknown module(s) in QT: webkitwidgets

Posted on 2015-02-23
7
Medium Priority
?
2,675 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 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

764 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