Qtcreator - I can not anymore insert new widget into my user interface.

  • Hi!
    I'm new for this forum and newbie in qtcretor user interface program.
    So, I've exported, moving/copying my previous-folder-project in another laptop to begin from an older user interface and add a new widget to complete my actual;
    After reconfigure and rebuild procedure, I have adjoint new widget (lcdnumber) by graphical method from "design mode" but is not recognized from compiler and show me this error:

    @/dialog.cpp:126: error: 'class Ui::Dialog' has no member named 'lcdNumber'

    why? in general after the adjoint in the gui is automatically recalled in the code when you digit first letter.....

    I post the the part of code:
    @void Dialog::processFrameAndUpdateGUI(){
    double FPS = (double)(FPStimer.elapsed()/n);


  • Welcome to DevNet!

    What is the name of the widget?
    "lcdnumber" or "lcdNumber"

  • Go to designer mode and open the UI file. Go to property window and see what is the object name given for 'lcd'. I suspect that either lcd is not added to your dialog or it has been given the different object name. By default object name is 'lcdNumber'. This should fix your issue.

  • This is my tab order object. As you see my lcdnumber is jumped....
    In my property windows lcdNumber is under my QDialog class......

  • There will be header file called ui_dialog.h in build directory. Can you check whether it has lcdNumber ? I suspect that you have some old ui_dialog.h somewhere in the path. This may be causing the issue. Can you chck ui_dialog.h file ?

  • Thanks!
    I had a ui_dialog.h into my project folder, so my compiler didn't find my correct ui_dialog.h into build folder!
    Now it's all ok

  • You can make this request to Solved State. It will help others as well.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.