Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Qt GUI with Eclipse c++
Forum Updated to NodeBB v4.3 + New Features

Qt GUI with Eclipse c++

Scheduled Pinned Locked Moved Unsolved Language Bindings
11 Posts 3 Posters 3.3k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    What do you mean by "check the click event" ?

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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      GastonMelo
      wrote on last edited by
      #3

      in the GUI I have 2 buttons. I want to print a message when I click on 1 button.
      Gastón

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Just use qDebug for that.

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

        1 Reply Last reply
        1
        • G Offline
          G Offline
          GastonMelo
          wrote on last edited by
          #5

          qDebug? Where en eclipse c++? Can you elaborate? Im using eclipse c++ with Qt5 Gui on linux tumbleweed.
          Gastón

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            It has nothing specific to Eclipse, it's a stream operator that will send whatever you pass to it to the console.

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

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GastonMelo
              wrote on last edited by
              #7

              Maybe I wrote incorrectly my question. Here we go: Im using Qt5 and eclipse c++. I made a simple GUI on Qt5 and converted to cpp with UIC file (in the binary folder inside Qt5). In eclipse I'm using this cpp file (as header file) to invoke that GUI.
              What I want to do now is to be able to use those 2 buttons in the GUI. I want to display a message when I press one of those 2 buttons. Here is the question, how I do that in eclipse cpp? looking in other forum I see this line:

              QObject::connect(button, SIGNAL(clicked()),this, SLOT(clickedSlot()));

              I dont understand the "this" parameter in the connect(). The clickedSlot() is the subroutine generated when the button is clicked. How to translate "this" to eclipse.

              Thanks for you help SGaist.
              Gastón

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Ok, then first thing to understand: Eclipse is just an IDE, Eclipse C++, is just a specialisation of Eclipse to write C++ programs. There's nothing to translate here, Qt is a C++ framework, whether your write your application with Eclipse or on the command line, it doesn't change anything.

                If you don't know what this represent in C++, I encourage you to first learn the C++ basics before going any further.

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

                1 Reply Last reply
                1
                • G Offline
                  G Offline
                  GastonMelo
                  wrote on last edited by
                  #9

                  you are right. How do I define a private slot in c++. I dont have that vast knlowdge.
                  Gastón

                  aha_1980A 1 Reply Last reply
                  0
                  • G GastonMelo

                    you are right. How do I define a private slot in c++. I dont have that vast knlowdge.
                    Gastón

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

                    @GastonMelo

                    You should read https://doc.qt.io/archives/qt-4.8/signalsandslots.html to get a feeling for that topic.

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      I'd recommend reading the Qt5 version: https://doc.qt.io/qt-5/signalsandslots.html

                      @GastonMelo You really should take the time to go through Qt's documentation. It's full of tutorials, getting started guides and it also explains all the core concepts provided within the framework.

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

                      1 Reply Last reply
                      1

                      • Login

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