开发者

QtWebKit for Qt Visual Studio Add-in

开发者 https://www.devze.com 2023-03-11 09:12 出处:网络
I want to learn how to use QtWebKit by creating a simple project, but I can\'t even install it. I found some tutorials like this, but it\'s for the standard Qt package. I am using for another project

I want to learn how to use QtWebKit by creating a simple project, but I can't even install it. I found some tutorials like this, but it's for the standard Qt package. I am using for another project the Visual Studio Qt Add-in, so I don't want to uninstall it.

I found some WebKit source code in Qt-VS, but I don't know what to do with it. It does not contain any Perl script so the tutorial above is not good for it, but it does contain some makefiles. Or should I download the QtWebKit package separately, and follow the tutorial above? Will it generate compatible libraries? (I could not find开发者_开发知识库 any Qt command prompt, and the tutorial says the VS command prompt must be compatible. How do I know it?) Also, where should I move the binaries generated, so the project made with the built-in Qt template in Visual Studio to be able to find these new files?

Sorry for these lame questions, but I get lost really fast when it comes to building stuff from source and not given in binary form.

I would appreciate any feedback or link to stuff

EDIT: The only thing I could pull of is to install another copy of Qt, the normal one, and use it for the WebKit project changing the Qt environment variable value each time I'm switching the project, but that would be the lamest thing ever.


  1. Download the Qt 4.7.3 source code:

    http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.zip

  2. Unzip and copy to a convenient location.

  3. Open a Visual Studio 2010 command prompt.

    You may need to run the command prompt as administrator. To do this, go to Start Menu > All Programs > Microsoft Visual Studio 2010 > Visual Studio Tools, right-click on Visual Studio Command Prompt (2010) and select Run as administrator.

    To make a 64-bit build, select Visual Studio x64 Win64 Command Prompt (2010) instead.

  4. Change the working directory to the Qt top folder.

  5. Run the commands:

    configure.exe -platform win32-msvc2010

    nmake

  6. Wait an hour.

This will build Qt, with all components, including QtWebKit.

Does this answer your question?


user763305's steps will work with these additions:

You need to install Perl. I used "ActiveState Perl" You need to install WinFlex and WinBison. For some reason the QT script refers to the flex as "win_flex" but tries to find an executable called "bison.exe." I renamed "win_bison" to "bison.exe" and it worked.

I was also able to configure it successfully and build for msvc2012

configure.exe -platform win32-msvc2012
nmake

And it didn't take a few hours on my machine. Just about 55 minutes.

0

精彩评论

暂无评论...
验证码 换一张
取 消