Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Link error with static webkit 4.8.1
Forum Updated to NodeBB v4.3 + New Features

Link error with static webkit 4.8.1

Scheduled Pinned Locked Moved Qt WebKit
9 Posts 5 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chr_charles
    wrote on last edited by
    #1

    Hi all,

    I'm stuck with a basic link error.

    I'm using Visual 2008 and the Qt pluging on Windows 7 x64 and Qt 4.8.1

    I have a small class who inherits from QWebPage and I cannot link it with QWebkit.

    my class :

    @
    class MyQWebPage: public QWebPage {
    Q_OBJECT ;
    private:
    ResourceObject & resource;
    public:
    MyQWebPage(ResourceObject & res);
    virtual void javaScriptAlert(QWebFrame * frame, const QString & msg);
    virtual bool javaScriptConfirm(QWebFrame * frame, const QString & msg);
    virtual bool javaScriptPrompt(QWebFrame * frame, const QString & msg, const QString & defaultValue, QString * result);
    virtual void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
    public slots:
    bool shouldInterruptJavaScript();
    };@

    first error :
    1>mywebclass.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWebPage::staticMetaObject" (?staticMetaObject@QWebPage@@2UQMetaObject@@B)

    And I have 8 of them like this one.

    In the Qt project settings, QwebKit is included, on the project setting the lib file QtWebKitd4.lib is a dependencies.

    In the file there are other class like
    @
    class MyNetworkAccessManager: public QNetworkAccessManager {
    Q_OBJECT
    private:
    ...
    public:
    ...
    signals:
    ...
    };
    @
    but those one does not produce link error.

    Can someone help me ?

    Thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      welcome to devnet

      Did you create static Qt libs?
      AFAIK that is not possible with webkit.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chr_charles
        wrote on last edited by
        #3

        thanks for your response.

        Nope, I'm using the web kit as provided by qt, using the lib file and header files and at last the dlls.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          eikeR
          wrote on last edited by
          #4

          did you create the .moc files with moc.exe?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            It is not supported to use webkit in a static build of Qt. It was mentioned in some documentation, but I don't remember where exactly.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Landy
              wrote on last edited by
              #6

              If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
              [quote author="Volker" date="1338133565"]It is not supported to use webkit in a static build of Qt. It was mentioned in some documentation, but I don't remember where exactly.[/quote]

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #7

                [quote author="Landy" date="1338428173"]If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
                [/quote]

                I have no idea, sorry.

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Landy
                  wrote on last edited by
                  #8

                  Ohh, it's really a bad news to me.
                  I have to i have to use web feature in a static build of Qt.
                  I can't believe that there was no web control before webkit was intergrated into Qt.
                  Anyway, thanks for your reply, Volker.

                  [quote author="Volker" date="1338500998"]
                  [quote author="Landy" date="1338428173"]If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
                  [/quote]

                  I have no idea, sorry.[/quote]

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #9

                    While not a full featured web browser, [[Doc:QTextBrowser]] might support a suitable subset of HTML for your use case.

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved