Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8209669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:48:21+00:00 2026-06-07T09:48:21+00:00

#include framecapture.h #include <iostream> #include <QtWidget> int main(int argc, char * argv[]) { if

  • 0
#include "framecapture.h"

#include <iostream>
#include <QtWidget>

int main(int argc, char * argv[])
{
    if (argc != 3) {
        std::cout << "Capture a web page and save its internal frames in different images" << std::endl << std::endl;
        std::cout << "  framecapture <url> <outputfile>" << std::endl;
        std::cout << std::endl;
        std::cout << "Notes:" << std::endl;
        std::cout << "  'url' is the URL of the web page to be captured" << std::endl;
        std::cout << "  'outputfile' is the prefix of the image files to be generated" << std::endl;
        std::cout << std::endl;
        std::cout << "Example: " << std::endl;
        std::cout << "  framecapture qt.nokia.com trolltech.png" << std::endl;
        std::cout << std::endl;
        std::cout << "Result:" << std::endl;
        std::cout << "  trolltech.png (full page)" << std::endl;
        std::cout << "  trolltech_frame1.png (...) trolltech_frameN.png ('N' number of internal frames)" << std::endl;
        return 0;
    }

    QUrl url = QUrl::fromUserInput(QString::fromLatin1(argv[1]));
    QString fileName = QString::fromLatin1(argv[2]);

    QApplication a(argc, argv);
    FrameCapture capture;
    QObject::connect(&capture, SIGNAL(finished()), QApplication::instance(), SLOT(quit()));
    capture.load(url, fileName);

    return a.exec();
}

I get QtWidget file or directory not found. When I use QWidget, it will say

/home/me/qtwebkit-examples-and-demos/examples/webkit/framecapture-build-desktop/../framecapture/main.cpp:68:
error: variable ‘QApplication a’ has initializer but incomplete type

/home/me/qtwebkit-examples-and-demos/examples/webkit/framecapture-build-desktop/../framecapture/main.cpp:70:
error: incomplete type ‘QApplication’ used in nested name specifier

I don’t know why none of the examples from git://gitorious.org/+qt-developers/qt/qtwebkit-examples-and-demos-staging.git is working. It always seems to complain about the #includes not finding the required components.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:48:24+00:00Added an answer on June 7, 2026 at 9:48 am

    You will simply have to include QApplication. That is:

    #include <QApplication>
    

    If I’m not mistaken there is no such include file as <QtWidget> anyway. That should be <QWidget>. Given the specific example I would expect a general include of <QtGui> instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#include <iostream> using namespace std; int main() { int a, b, c, max; cout<<a=;
#include <QtCore/QCoreApplication> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); a.setApplicationName(xxx); char bb[25]
#include<QApplication> #include<QTranslator> #include<QObject> #include<QTextCodec> #include<QWidget> int main(int argc, char* argv[]) { QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); QApplication app(argc,
#include <stdio.h> #include <stdlib.h> int main(int argc,char *argv[]) { system(PAUSE); return 0; } After
#include<iostream> #include<cstdio> using namespace std; int main() { int T; char J[100], S[100]; int
#include <iostream> using namespace std; int main (void) { cout << 1\t2\t3\t4\t5\t6\t7\t8\t9 << endl
#include <iterator> #include <iostream> using namespace std; const int MAX_NAME_LENGTH=100; int main() { char
#include <GL/gl.h> #include <GL/glut.h> void display(); void init(); int main(int argc, char* argv[]) {
#include <QtCore/QCoreApplication> #include <QtGui/QLabel> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QLabel
#include ellison.h int main(int argc, char *argv[]) { if (argc > 1) { int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.