Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Please solve this Q_INIT_RESOURCE error
Forum Updated to NodeBB v4.3 + New Features

Please solve this Q_INIT_RESOURCE error

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 9.7k 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.
  • M Offline
    M Offline
    Maheshwara
    wrote on last edited by
    #1

    Dear Friends,
    I'm new to Qt and i'm just implement the sample code in qt which is in the link below.but i have an error while i build this.
    http://doc.qt.nokia.com/4.7-snapshot/demos-spreadsheet.html
    The error is...,undefined reference to 'qInitResources_spreadsheet()' in main.cpp file. I've did this by Empty Qt project. i think may be its occurred in .pro file. can anyone please help this... Thanks in advance

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qtnovice
      wrote on last edited by
      #2

      Did you add spreadsheet.qrc as resource in your project?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Maheshwara
        wrote on last edited by
        #3

        bq. Did you add spreadsheet.qrc as resource in your project?

        .qrc file includes only an image... what happens if we do not include that .qrc file?.

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qtnovice
          wrote on last edited by
          #4

          The following line is in main.cpp:
          @Q_INIT_RESOURCE(spreadsheet);@
          that obliges you to add spreadsheet.qrc to your project.

          The following line is in main.cpp:
          @sheet.setWindowIcon(QPixmap(":/images/interview.png"));@
          So you need to add /images/interview.png as resource in spreadsheet.qrc resources file.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Maheshwara
            wrote on last edited by
            #5

            I added that .qrc file now it works fine... but i thought its just an image file. thank u Qtnovice...:-)

            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