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. UI file can't find customer widget .h file
Forum Updated to NodeBB v4.3 + New Features

UI file can't find customer widget .h file

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.5k Views 2 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.
  • P Offline
    P Offline
    Phong
    wrote on 20 Mar 2017, 08:24 last edited by
    #1

    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??

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 20 Mar 2017, 22:50 last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 21 Mar 2017, 02:59
      1
      • D Offline
        D Offline
        dheerendra
        Qt Champions 2022
        wrote on 21 Mar 2017, 02:18 last edited by
        #3

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

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        4
        • S SGaist
          20 Mar 2017, 22:50

          Hi,

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

          P Offline
          P Offline
          Phong
          wrote on 21 Mar 2017, 02:59 last edited by Phong
          #4

          @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");
          
          
          P 1 Reply Last reply 21 Mar 2017, 03:52
          0
          • P Phong
            21 Mar 2017, 02:59

            @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");
            
            
            P Offline
            P Offline
            Phong
            wrote on 21 Mar 2017, 03:52 last edited by
            #5

            @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~

            1 Reply Last reply
            1

            1/5

            20 Mar 2017, 08:24

            • Login

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