UI file can't find customer widget .h file



  • Hello every one I was trying to add the source code to my project.
    source code : https://github.com/Anchakor/MRichTextEditor

    and I change the class name to fit my project.
    but the following error exist :

    .../ui_texteditor.h:24: error: mtextedit.h: No such file or directory
     #include "mtextedit.h"
                           ^
    

    part of ui_texteditor.h :

    #include <QtWidgets/QSpacerItem>
    #include <QtWidgets/QToolButton>
    #include <QtWidgets/QVBoxLayout>
    #include <QtWidgets/QWidget>
    #include "mtextedit.h"   //<---error part
    
    QT_BEGIN_NAMESPACE
    
    class Ui_TextEditor
    {
    public:
        QVBoxLayout *verti
    

    I just changed the mrichtextedit class --> texteditor class
    and I changed the .ui file and the filename as well.

    anything I missed??


  • Lifetime Qt Champion

    Hi,

    What exactly did you change ? Only the class name or also the matching files ?



  • Ui_texteditor.h file is generated file. U should not modify this. Any reason u r adding the file entry ?



  • @SGaist @dheerendra

    Hi all,
    I tried not to changed any things of the code again.
    And copy the code to my project for use.
    But the issue still appeared.

    the file I copy to my project:

    • mrichtextedit.ui
    • mrichtextedit.h mrichtextedit.cpp
    • mtextedit.h mtextedit.cpp

    (in my mainwindow)

    MRichTextEdit  * txtedit = new MRichTextEdit(this);
    
    // add it as one of the tab page
    tab->addTab(txtEdit, "tab1");
    
    


  • @SGaist @dheerendra

    Hey all,

    I got the point !
    I have to changed the headfile path in the Promote Widget setting form.

    Thanks a lot guys~


Log in to reply
 

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