Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Add QDeclarativeView widget to MainWindows.ui cause link error
Forum Updated to NodeBB v4.3 + New Features

Add QDeclarativeView widget to MainWindows.ui cause link error

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 4.9k 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.
  • K Offline
    K Offline
    kathy
    wrote on 6 May 2011, 14:35 last edited by
    #1

    I use Qt Creator (2.1 and 2.2 RC) to create a Qt GUI application by using create project wizard. I have Qt 4.7.3 library installed for Windows XP. After new project created, I build it and successful. But if I drag a QDeclarativeView widget to MainWindows.ui and try to build again and got link errors like:

    MainWindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QDeclarativeView::QDeclarativeView(class QWidget *)" (_imp??0QDeclarativeView@@QAE@PAVQWidget@@@Z) referenced in function "public: void __thiscall Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QAEXPAVQMainWindow@@@Z)

    What is the problem?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 6 May 2011, 16:40 last edited by
      #2

      Did you add this to you .pro file?

      @
      QT += declarative
      @

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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kathy
        wrote on 6 May 2011, 21:38 last edited by
        #3

        Yes. Thank you.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on 6 May 2011, 21:59 last edited by
          #4

          kathy, "yes" as "yes, I've added it" or as "yes, it solved the problem"?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kathy
            wrote on 6 May 2011, 22:47 last edited by
            #5

            yes, it solved the problem

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenisKormalev
              wrote on 7 May 2011, 08:00 last edited by
              #6

              then please don't forget to mark thread as [solved].

              1 Reply Last reply
              0

              1/6

              6 May 2011, 14:35

              • Login

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