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. [SOLVED] Qt 5 Code Editor Example
Qt 6.11 is out! See what's new in the release blog

[SOLVED] Qt 5 Code Editor Example

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.2k Views 1 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.
  • B Offline
    B Offline
    bnosam
    wrote on last edited by
    #1

    I made a new project and copied and pasted the code present in this: http://qt-project.org/doc/qt-5/qtwidgets-widgets-codeeditor-example.html

    However when I try to compile it says:

    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall CodeEditor::CodeEditor(class QWidget *)" (??0CodeEditor@@QAE@PAVQWidget@@@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QAE@PAVQWidget@@@Z)

    The code should work but it doesn't :S

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Do you have an implementation of CodeEditor::CodeEditor(QWidget *parent) in codeeditor.cpp?

      If you installed Qt using an installer from qt-project.org then you can find this example in Qt/Examples/Qt-5.3/widgets/widgets/codeeditor
      Try the project from that directory. Does it work ?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bnosam
        wrote on last edited by
        #3

        Fixed it, it must have just been a weird bug in that project file. Copying everything over and running it worked fine.

        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