Error in Qt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StayForShow
    New Member
    • Aug 2014
    • 1

    Error in Qt

    Hello,
    i'm new in qt and i don't understand why its a error:
    Code:
     Ui_new_game::lineEdit_2 -> text() -> player2;
    The Error:
    Code:
    invalid use of non-static data member 'lineEdit_2'
        Ui_new_game::lineEdit_2 -> text() -> player2;
        ~~~~~~~~~~~~~^~~~~~~~~~
    Sorry for my bad english

    Bye
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I can't tell if this code is wrong from the amount you posted.

    I can say for it to be correct lineEdit_2 must be a pointer to a lineEdit_2 object. And I can say that lineEdit_2::tex t() must return a pointer to the type of object that player2 is.


    You should post more of the code.

    Comment

    Working...