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. Auto Complete (suggestion) not work in SIGNAL QT creator 4.8
Forum Updated to NodeBB v4.3 + New Features

Auto Complete (suggestion) not work in SIGNAL QT creator 4.8

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 5 Posters 3.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.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by
    #1

    Hello,

    Iam using the last version of QT 5.12.0 and before I was using QT 5.11.2, when I write a code for some projects I notice that when I try to write a line of code which contains signal and slot like this

    connect(key, SIGNAL(activated()), this, SLOT(keyPressed()));
    

    I always use the QT creator Ctrl + space as any other IDE to get the suggestion to open a list and I choose the word but when I press ctrl + space in the signal part I can't find the list and he gives me this error here
    alt text
    this problem happened since QT 5.11.2, I have QT 5.11.0 and it worked fine with no problem it gives me a list with all the SIGNALs in this class, also another problem when I write the slot it gives me the list of all functions the old QT version just give me only the slots.

    so what is the problem make this happened, is it a problem in the way I use? or it's a setting issue I should edit for the new versions of QT to make it work like the old one or it's a bug?

    because it's really annoying and let me take time for writing my code, at the same time I always update my computer with the last version of QT and I want to use the last version the updated one.

    Thanks in advance.

    jsulmJ aha_1980A M 3 Replies Last reply
    1
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by dheerendra
      #2

      Is this issue happening for every class in Qt library ? Is it specific to QHotKey ? It may be just Qt creator issue(not Qt library issue). May be you can updated Qt Creator. It should work.

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

      1 Reply Last reply
      0
      • AmrCoderA AmrCoder

        Hello,

        Iam using the last version of QT 5.12.0 and before I was using QT 5.11.2, when I write a code for some projects I notice that when I try to write a line of code which contains signal and slot like this

        connect(key, SIGNAL(activated()), this, SLOT(keyPressed()));
        

        I always use the QT creator Ctrl + space as any other IDE to get the suggestion to open a list and I choose the word but when I press ctrl + space in the signal part I can't find the list and he gives me this error here
        alt text
        this problem happened since QT 5.11.2, I have QT 5.11.0 and it worked fine with no problem it gives me a list with all the SIGNALs in this class, also another problem when I write the slot it gives me the list of all functions the old QT version just give me only the slots.

        so what is the problem make this happened, is it a problem in the way I use? or it's a setting issue I should edit for the new versions of QT to make it work like the old one or it's a bug?

        because it's really annoying and let me take time for writing my code, at the same time I always update my computer with the last version of QT and I want to use the last version the updated one.

        Thanks in advance.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @AmrCoder I guess you still can build and run your app, right?
        I think it is a problem with QtCreator and code complete and code model.
        You can try to disable Clang code model by disabling Clang plug-in.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • AmrCoderA AmrCoder

          Hello,

          Iam using the last version of QT 5.12.0 and before I was using QT 5.11.2, when I write a code for some projects I notice that when I try to write a line of code which contains signal and slot like this

          connect(key, SIGNAL(activated()), this, SLOT(keyPressed()));
          

          I always use the QT creator Ctrl + space as any other IDE to get the suggestion to open a list and I choose the word but when I press ctrl + space in the signal part I can't find the list and he gives me this error here
          alt text
          this problem happened since QT 5.11.2, I have QT 5.11.0 and it worked fine with no problem it gives me a list with all the SIGNALs in this class, also another problem when I write the slot it gives me the list of all functions the old QT version just give me only the slots.

          so what is the problem make this happened, is it a problem in the way I use? or it's a setting issue I should edit for the new versions of QT to make it work like the old one or it's a bug?

          because it's really annoying and let me take time for writing my code, at the same time I always update my computer with the last version of QT and I want to use the last version the updated one.

          Thanks in advance.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by aha_1980
          #4

          Hi @AmrCoder,

          That is tracked by QTCREATORBUG-20737.

          You can either disable the Clang Code Model, as @jsulm suggested (Help > About Plugins > Clang Code Model) or switch to the new Signal&Slot syntax (which I would recommend, but unfortunately the completion is not perfect there either: QTCREATORBUG-13558).

          Regards

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          4
          • AmrCoderA Offline
            AmrCoderA Offline
            AmrCoder
            wrote on last edited by
            #5

            Thank you very much, the autocomplete work as in QT 5.11.0 when I disabled the Clang code model

            1 Reply Last reply
            0
            • AmrCoderA AmrCoder

              Hello,

              Iam using the last version of QT 5.12.0 and before I was using QT 5.11.2, when I write a code for some projects I notice that when I try to write a line of code which contains signal and slot like this

              connect(key, SIGNAL(activated()), this, SLOT(keyPressed()));
              

              I always use the QT creator Ctrl + space as any other IDE to get the suggestion to open a list and I choose the word but when I press ctrl + space in the signal part I can't find the list and he gives me this error here
              alt text
              this problem happened since QT 5.11.2, I have QT 5.11.0 and it worked fine with no problem it gives me a list with all the SIGNALs in this class, also another problem when I write the slot it gives me the list of all functions the old QT version just give me only the slots.

              so what is the problem make this happened, is it a problem in the way I use? or it's a setting issue I should edit for the new versions of QT to make it work like the old one or it's a bug?

              because it's really annoying and let me take time for writing my code, at the same time I always update my computer with the last version of QT and I want to use the last version the updated one.

              Thanks in advance.

              M Offline
              M Offline
              maxim2511
              wrote on last edited by
              #6

              @AmrCoder Problem is with new version of clangCodeModel in modules. Somehow auto fill dont work anymore, but there is something else very useful, like prediction of what should be typed on.
              With turned off clangCodeModel Auto fill is working, and for example void ```

              test( qstring a, int b, QObiect c )
              is completed from for example base class, it works that when I type

              void test(| )
              

              and when cursor is close to open bracket, it shows hint of original function declaration, but when cursor is moved

              void test( |)
              

              then is showing examples of auto completion or even is replacing whole line from original virtual function.

              But when clangCodeModel is On then it is not working anymore, like this module is override the basic behavior.
              I need remind that clang module have smart prediction but is colliding with auto fill whole line inside of brackets.

              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