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.

problem with promoting widget.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.9k Views
  • 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 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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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 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?

        mrjjM 1 Reply Last reply
        0
        • B beqa

          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?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on 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 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

            mrjjM 1 Reply Last reply
            0
            • B beqa

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

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on 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

              • Login

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