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. HAVING SOME BASIC QUERIES AS A BEGINNER

HAVING SOME BASIC QUERIES AS A BEGINNER

Scheduled Pinned Locked Moved General and Desktop
13 Posts 5 Posters 1.6k 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
    PraviN3738
    wrote on last edited by
    #1

    HI AND HELLO TO ALL THE QT CHAMPIONS,
    AS A BEGINNER, I HAVE SOME QUERIES IN USING QT..(THAT MIGHT BE SIMPLE ALSO) BUT AM LEARNING SOMETHING NEW DAILY.. :-)

    1. IF I CREATE A UI FORM , WHETHER I NEED TO WRITE SOME CODE FOR THAT OR NOT ? (EXCEPT SOME FUNCTIONALITIES)

    2. HOW TO INTERACT WITH GUI TO BOARD ? ( SHARE ME SOME EXAMPLE CODES TO REFER THE BASIC FUNCTIONALITY)
      JUST I WANT TO HAVE A LOOK ON IT AND WORK ON THAT..

    THANK U IN ADVANCE..

    ODБOïO 1 Reply Last reply
    0
    • P PraviN3738

      HI AND HELLO TO ALL THE QT CHAMPIONS,
      AS A BEGINNER, I HAVE SOME QUERIES IN USING QT..(THAT MIGHT BE SIMPLE ALSO) BUT AM LEARNING SOMETHING NEW DAILY.. :-)

      1. IF I CREATE A UI FORM , WHETHER I NEED TO WRITE SOME CODE FOR THAT OR NOT ? (EXCEPT SOME FUNCTIONALITIES)

      2. HOW TO INTERACT WITH GUI TO BOARD ? ( SHARE ME SOME EXAMPLE CODES TO REFER THE BASIC FUNCTIONALITY)
        JUST I WANT TO HAVE A LOOK ON IT AND WORK ON THAT..

      THANK U IN ADVANCE..

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by ODБOï
      #2

      hi,
      you forgot CAPS LOCK

      @PraviN3738 said in HAVING SOME BASIC QUERIES AS A BEGINNER:

      IF I CREATE A UI FORM , WHETHER I NEED TO WRITE SOME CODE FOR THAT OR NOT ? (EXCEPT SOME FUNCTIONALITIES)

      if you mean *.ui.qml files, no, you only have to edit this files in Design mode
      http://doc.qt.io/qtcreator/creator-quick-ui-forms.html

      @PraviN3738 said in HAVING SOME BASIC QUERIES AS A BEGINNER:

      HOW TO INTERACT WITH GUI TO BOARD ?

      what board you want to interact with ? could you provide more information about that ?

      1 Reply Last reply
      4
      • P Offline
        P Offline
        PraviN3738
        wrote on last edited by
        #3

        HI LeLev,

        @LeLev
        THANKS.. I AM CREATING THE QT WIDGETS APPLICATION , IN THAT ( .UI FORM ) , I AM CREATING SOME SIGNAL AND SLOTS IN THE UI FORM ITSELF... I AM ASKING ON THAT..

        ABOUT THE INTERACTION WITH THE BOARD, MAY BE LIKE SOME XILINX BOARD

        <--USING CAPS LOCK IS ON IS MY STYLE-->

        THANK YOU ONCE AGAIN..

        K 1 Reply Last reply
        0
        • P PraviN3738

          HI LeLev,

          @LeLev
          THANKS.. I AM CREATING THE QT WIDGETS APPLICATION , IN THAT ( .UI FORM ) , I AM CREATING SOME SIGNAL AND SLOTS IN THE UI FORM ITSELF... I AM ASKING ON THAT..

          ABOUT THE INTERACTION WITH THE BOARD, MAY BE LIKE SOME XILINX BOARD

          <--USING CAPS LOCK IS ON IS MY STYLE-->

          THANK YOU ONCE AGAIN..

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          @PraviN3738

          @LeLev meant that it is impolite to use always capital letters, because it is considered as shouting in Internet.

          That is also the common understanding in Qt fora and our users don't take this lightly. Therefore, you better stop it and write as others do.

          Vote the answer(s) that helped you to solve your issue(s)

          P 1 Reply Last reply
          2
          • K koahnig

            @PraviN3738

            @LeLev meant that it is impolite to use always capital letters, because it is considered as shouting in Internet.

            That is also the common understanding in Qt fora and our users don't take this lightly. Therefore, you better stop it and write as others do.

            P Offline
            P Offline
            PraviN3738
            wrote on last edited by
            #5

            @koahnig

            OK FINE..I AM NEW TO THIS FORUM, I THOUGHT IT WILL BE NOTICED SOON AND GET AN REPLY SOONER FOR MY PROBLEM..

            ANYWAY I WILL TRY TO OFF CAPS LOCK..

            I THOUGHT YOU ARE REPLYING FOR MY QUERIES..BUT YOU ARE REPORTING ABOUT MY WAY OF COMMUNICATION..

            aha_1980A 1 Reply Last reply
            0
            • P PraviN3738

              @koahnig

              OK FINE..I AM NEW TO THIS FORUM, I THOUGHT IT WILL BE NOTICED SOON AND GET AN REPLY SOONER FOR MY PROBLEM..

              ANYWAY I WILL TRY TO OFF CAPS LOCK..

              I THOUGHT YOU ARE REPLYING FOR MY QUERIES..BUT YOU ARE REPORTING ABOUT MY WAY OF COMMUNICATION..

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

              @PraviN3738

              You should not expect answers if you don't stick to the rules. Your posts in uppercase are hard to read, so I gave up.

              As a C++ programmer, you have to care about syntax, and correct case is essential. Please take the same care when communicating with others.

              I apologize in advance for issues in my post, but I'm on the phone and things are a bit harder than on a real keyboard here.

              Thanks for reading.
              Regards

              Qt has to stay free or it will die.

              P 1 Reply Last reply
              5
              • aha_1980A aha_1980

                @PraviN3738

                You should not expect answers if you don't stick to the rules. Your posts in uppercase are hard to read, so I gave up.

                As a C++ programmer, you have to care about syntax, and correct case is essential. Please take the same care when communicating with others.

                I apologize in advance for issues in my post, but I'm on the phone and things are a bit harder than on a real keyboard here.

                Thanks for reading.
                Regards

                P Offline
                P Offline
                PraviN3738
                wrote on last edited by
                #7

                @aha_1980

                my apologize to you all,,
                thank you,..
                will not repeat the same..

                i respect you all.. here i came to learn some new things..

                just i created the GUI ,, now i am looking on how to work on that regarding some functionality..
                ( like interface and interact with some mother board)
                so i need some examples, so that i can refer all and work on my project..

                thank you,,

                K 1 Reply Last reply
                1
                • P PraviN3738

                  @aha_1980

                  my apologize to you all,,
                  thank you,..
                  will not repeat the same..

                  i respect you all.. here i came to learn some new things..

                  just i created the GUI ,, now i am looking on how to work on that regarding some functionality..
                  ( like interface and interact with some mother board)
                  so i need some examples, so that i can refer all and work on my project..

                  thank you,,

                  K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #8

                  @PraviN3738

                  Probably best is when you start out with the different Qt examples. There are already a lot of different aspects in using Qt covered. This should give you an overview.

                  Vote the answer(s) that helped you to solve your issue(s)

                  P 1 Reply Last reply
                  2
                  • mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #9

                    Hi
                    Regarding the UI.
                    If you use
                    alt text

                    you get a class .cpp and .h that is ready to go.
                    Say you place an LineEdit on the new form UI
                    alt text

                    then in code you can access it via the UI struct
                    like
                    ui->lineEdit->setText("Hello");
                    for setting or reading its value.

                    Say we add a QPushButton
                    alt text
                    Then for it to do something, we need to hook up its signal to our own code/function
                    ( this you do in constructor of main window, AFTER setupUI() )

                    connect(ui->pushButton, &QPushButton::clicked, this, &MainWindow::pushButtonclicked );

                    then in your functions ( called a slot)

                    
                    void MainWindow::pushButtonclicked() {
                    ui->lineEdit->setText("Hello"); // set text of the line edit
                    }
                    

                    all is explained here.
                    http://doc.qt.io/qt-5/signalsandslots.html

                    As a side note. Caps wont work well anywhere and the key to get faster reply in this forum, is
                    a good question. Tell what you have done so far. What you see and what you expect to see/ happen.
                    Show code if you have any and be very concrete about which part is not working as expected.
                    Then people can fast help you archive what you want :)

                    P 1 Reply Last reply
                    6
                    • K koahnig

                      @PraviN3738

                      Probably best is when you start out with the different Qt examples. There are already a lot of different aspects in using Qt covered. This should give you an overview.

                      P Offline
                      P Offline
                      PraviN3738
                      wrote on last edited by
                      #10

                      @koahnig

                      thank you.. i am refering that too..

                      1 Reply Last reply
                      0
                      • mrjjM mrjj

                        Hi
                        Regarding the UI.
                        If you use
                        alt text

                        you get a class .cpp and .h that is ready to go.
                        Say you place an LineEdit on the new form UI
                        alt text

                        then in code you can access it via the UI struct
                        like
                        ui->lineEdit->setText("Hello");
                        for setting or reading its value.

                        Say we add a QPushButton
                        alt text
                        Then for it to do something, we need to hook up its signal to our own code/function
                        ( this you do in constructor of main window, AFTER setupUI() )

                        connect(ui->pushButton, &QPushButton::clicked, this, &MainWindow::pushButtonclicked );

                        then in your functions ( called a slot)

                        
                        void MainWindow::pushButtonclicked() {
                        ui->lineEdit->setText("Hello"); // set text of the line edit
                        }
                        

                        all is explained here.
                        http://doc.qt.io/qt-5/signalsandslots.html

                        As a side note. Caps wont work well anywhere and the key to get faster reply in this forum, is
                        a good question. Tell what you have done so far. What you see and what you expect to see/ happen.
                        Show code if you have any and be very concrete about which part is not working as expected.
                        Then people can fast help you archive what you want :)

                        P Offline
                        P Offline
                        PraviN3738
                        wrote on last edited by
                        #11

                        @mrjj said in HAVING SOME BASIC QUERIES AS A BEGINNER:

                        connect(ui->pushButton, &QPushButton::clicked, this, &MainWindow::pushButtonclicked );

                        why we are using this line..?
                        without this line also it is working,

                        @ button click some event should occur, that is based on signal and slot rit .?
                        i did that..

                        now only i am writing the code.. just created the Gui only..

                        mrjjM 1 Reply Last reply
                        0
                        • P PraviN3738

                          @mrjj said in HAVING SOME BASIC QUERIES AS A BEGINNER:

                          connect(ui->pushButton, &QPushButton::clicked, this, &MainWindow::pushButtonclicked );

                          why we are using this line..?
                          without this line also it is working,

                          @ button click some event should occur, that is based on signal and slot rit .?
                          i did that..

                          now only i am writing the code.. just created the Gui only..

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @PraviN3738
                          Hi
                          That is a line to connect button signal to something. (user code)
                          While you can do that directly in Designer it's not good and will break easily
                          so it's truly recommended to do directly in the code for any real-life application.
                          But yes, only need when button should do something.
                          Just placing it on FORM also works.

                          P 1 Reply Last reply
                          3
                          • mrjjM mrjj

                            @PraviN3738
                            Hi
                            That is a line to connect button signal to something. (user code)
                            While you can do that directly in Designer it's not good and will break easily
                            so it's truly recommended to do directly in the code for any real-life application.
                            But yes, only need when button should do something.
                            Just placing it on FORM also works.

                            P Offline
                            P Offline
                            PraviN3738
                            wrote on last edited by
                            #13

                            @mrjj thank you,.

                            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