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. LineEdit Signal
Qt 6.11 is out! See what's new in the release blog

LineEdit Signal

Scheduled Pinned Locked Moved General and Desktop
27 Posts 3 Posters 19.1k 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.
  • P Offline
    P Offline
    pragati
    wrote on last edited by
    #16

    I have different LineEdits, which have different slots....so but all should have same signal "click"

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #17

      Do you mean that these line edits should connect to different slots? If so, I stand by my previous advise: actually create your own LineEditWithClickedSignal class (or whatever you want to know it), and use that class instead of QLineEdit. Then, connect the clicked signal to whatever slot you need. Compare how you can connect the clicked signal of different QPushButtons on your form to different slots as well.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pragati
        wrote on last edited by
        #18

        Yeah I have to connect different Linedit with different slots but signal in each case shall be "click"

        Thanks Andre, will follow your advice, this looks much simpler, hope it will be little easy while implementing also.

        :)

        But still there is 1 more doubt....will it b possible to use my own linedit, when the LineEdit I meant to use is the one from ui_classname.h file?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #19

          [quote author="pragati" date="1347357263"]But still there is 1 more doubt....will it b possible to use my own linedit, when the LineEdit I meant to use is the one from ui_classname.h file?[/quote]
          Yes. Look for widget promotion in the Qt Designer documentation.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pragati
            wrote on last edited by
            #20

            Great!!!
            Thanks...

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pragati
              wrote on last edited by
              #21

              :(

              Got my lineEdit working as wanted, but am not able to use LineEdits's all functionalities....like setText, and many more.

              I need all those too....Is there not any other way with same requirement apart from defining my own class

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #22

                Show us the code then. We can't guess what you're doing wrong if you don't show us what you have.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pragati
                  wrote on last edited by
                  #23

                  Okay I will do that....But before that I want to ask that
                  I have a custom lineEdit which inherits from QLineEdit, defines its own click signal. Now if I use my custom lineEdit in my code will it be able to still use all other signals and slots of QLineEdit, or I have to define them again.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #24

                    Perhaps you should pick up a C++ book, and start studying the language you're using. This is really basic C++ stuff.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      pragati
                      wrote on last edited by
                      #25

                      yeah that I am doing continously also I look myself in every possible way before puttin up, I know I do lack that basic knowledge, I put this question, because when I inherited to my customLineEdit, it gave error as no such signals and slots for all the basic QLineEdit signals, likesetText and all, so thought to ask some qt expert.....Anyhow I was expecting this answer from you

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andre
                        wrote on last edited by
                        #26

                        I am sorry, but I think it is reasonable to expect a basic level of C++ proficiency from Qt users. Qt is very useful and easy to use, but it does not free you from understanding the basics of C++. That is not just commenting, but genuine advice. You will find you're more productive and understand Qt better if you also understand the basics of C++.

                        Note that my previous comment stands: show us the code, or noone will be able to give you good advice on your actual problems.

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          pragati
                          wrote on last edited by
                          #27

                          I am taking your comments...in a positive way .....
                          I appreciate your constant help.....
                          Thanks!!!!

                          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