Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Linker Error in Qt v5.6
Forum Updated to NodeBB v4.3 + New Features

Linker Error in Qt v5.6

Scheduled Pinned Locked Moved Solved C++ Gurus
3 Posts 2 Posters 930 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.
  • S Offline
    S Offline
    Shaharyaar
    wrote on last edited by
    #1

    Hi, I am student of Electrical Engineering. I am new to programming frameworks, I decided to use QT for GUI development of my end-semester programming project. But problem I am getting an error about linking which is given below:

    https://imgur.com/RBJwXZY

    How can I resolve this issue?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      It looks like you created a console application and trying to add widgets to it.
      Since you're using a widget (push button) you need to use QApplication instead of QCoreApplication. There are basically 3 subclasses:
      QCoreApplication is for apps wthout ui (e.g. console apps)
      QGuiApplication is for non-widget based ui apps (e.g. using QWindow or QML)
      QApplication is for widget based apps, like yours.

      To use widgets make sure you have that module enabled. You will also need gui module. Open your .pro file and make sure these modules are enabled like this:
      QT += core gui widgets
      If gui or widgets is missing add it and click Build->Run qmake. After that your project should build.

      1 Reply Last reply
      3
      • S Offline
        S Offline
        Shaharyaar
        wrote on last edited by
        #3

        Thanks for solution!!!

        1 Reply Last reply
        1

        • Login

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