Results 1 to 2 of 2

Thread: How to Automatically Compile QWebView

  1. #1
    Join Date
    Oct 2011
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to Automatically Compile QWebView

    I had added
    Qt Code:
    1. QT += webkit
    To copy to clipboard, switch view to plain text mode 
    to my .pro file, as well as
    Qt Code:
    1. #include <QWebView>
    To copy to clipboard, switch view to plain text mode 
    to my header file, and my project was compiling. I ran qmake -project to get rid of a vtable error, and now QtCreator is complaining about
    Qt Code:
    1. QWebView: No such file or directory.
    To copy to clipboard, switch view to plain text mode 
    . I opened the .pro file, and
    Qt Code:
    1. QT += webkit
    To copy to clipboard, switch view to plain text mode 
    is gone.

    Is there something I can do to automate this, or will I always have to manually edit my .pro files?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to Automatically Compile QWebView

    You ran "qmake -project" which generates a template PRO file listing all the headers and sources in the directory. That is, you asked qmake to overwrite the existing pro file with a template. You never need to run this more than once when first setting up your project (it's not essential then either).

    If you modify Q_OBJECT macros in your headers, or add/remove sources etc. then you should run "qmake". This rewrites the Makefile based on the rules in the PRO file: it does not modify the PRO file.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. Replies: 8
    Last Post: 3rd September 2013, 09:51
  2. qt creator 2.5 is getting closed automatically..
    By narlapavan in forum Qt Tools
    Replies: 1
    Last Post: 26th August 2012, 14:13
  3. qt creator 2.5 is getting closed automatically..
    By narlapavan in forum Qt Programming
    Replies: 1
    Last Post: 25th August 2012, 23:23
  4. How to launch an application automatically ?
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 16th January 2009, 15:26
  5. library not build automatically
    By KoosKoets in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2007, 13:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.