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. problem with promoting widget.
Forum Updated to NodeBB v4.3 + New Features

problem with promoting widget.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.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.
  • B Offline
    B Offline
    beqa
    wrote on 26 Dec 2016, 16:35 last edited by
    #1

    I add new qt designer form class (class name Form) and add one label in there . when i simply promote from mainwindow 's widget , trow me a vague error:
    LNK2019: unresolved external symbol "public: __cdecl Form::Form(class QWidget *)" (??0Form@@QEAA@PEAVQWidget@@@Z) referenced in function "public: void __cdecl Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QEAAXPEAVQMainWindow@@@Z)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 26 Dec 2016, 19:44 last edited by
      #2

      Hi
      Make sure your Form widget does in fact have a constructor taking
      Form::Form(class QWidget *)
      Else we need to see some code to give guesses :)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        beqa
        wrote on 26 Dec 2016, 20:08 last edited by
        #3

        hi
        Yes. it has it. Form class createed by dafault, only i add button in ui. Also mainwindow class is empty, only add widget, then promote it. what do i miss?

        M 1 Reply Last reply 26 Dec 2016, 20:10
        0
        • B beqa
          26 Dec 2016, 20:08

          hi
          Yes. it has it. Form class createed by dafault, only i add button in ui. Also mainwindow class is empty, only add widget, then promote it. what do i miss?

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 26 Dec 2016, 20:10 last edited by mrjj
          #4

          @beqa
          Not sure, it sounds ok. Without code its just random guesses..

          I can make u fast sample for test.
          https://www.dropbox.com/s/4cmo89vu24v6mfi/mypromoted.zip?dl=0

          1 Reply Last reply
          1
          • B Offline
            B Offline
            beqa
            wrote on 26 Dec 2016, 20:37 last edited by
            #5

            you are welcome. when i run my project after yours, it works, I dont know why but woks now :D very thanks

            M 1 Reply Last reply 26 Dec 2016, 21:03
            0
            • B beqa
              26 Dec 2016, 20:37

              you are welcome. when i run my project after yours, it works, I dont know why but woks now :D very thanks

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 26 Dec 2016, 21:03 last edited by
              #6

              @beqa
              Ok that is odd :)
              Maybe try run qmake manually.
              Only thing i can think of.

              1 Reply Last reply
              0

              1/6

              26 Dec 2016, 16: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