How Qt Signals & Slots Work

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ค. 2024
  • An introductory explanation to Qt Signals and Slots mechanism. If you are new to using Qt, this video should be helpful to you.
    __ Equipment __
    Microphone: amzn.to/3leXZR4
    Touch Input: amzn.to/30Z1Mex
    Main Monitor: amzn.to/3rfwfiQ
    Second Monitor: amzn.to/3Gw8NTv
    Video Editing: amzn.to/3lgb8Jv
    Video Camera: amzn.to/3nrwFjq
    Main Lighting: amzn.to/3GLE9FX
    Secondary Lighting: amzn.to/3npEsi0
    Headset: amzn.to/3A0GjP7
    USB Drive: amzn.to/3Gvm9PD
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 30

  • @lusher00
    @lusher00 2 ปีที่แล้ว +3

    This is the same as every other signals & slots explanation on TH-cam. I wish someone would show a non-trivial example. Create new objects with new signals and slots and link them together.

  • @matekomenda4706
    @matekomenda4706 2 ปีที่แล้ว +1

    Well explained! Thank you mate, It really really helped me to understand this concept!

  • @beyer_the_burger
    @beyer_the_burger 2 ปีที่แล้ว +1

    Thanks, this really helped me understand them more!

  • @AM-ku9cw
    @AM-ku9cw 2 ปีที่แล้ว

    Thank you very much for the very clear explanation 🙏🏻☺️🌷

  • @paulkap12
    @paulkap12 หลายเดือนก่อน

    Nice video, but the question is how we can pass this param1 that you show us in the end of the video from the scope where we have written the connect function? That's what I have never find a way to do yet.

  • @frettmann5317
    @frettmann5317 7 หลายเดือนก่อน

    Thank u man really 👋🏻 gratulation from Europa

  • @pleinclosens8304
    @pleinclosens8304 2 ปีที่แล้ว

    Very clear 💯

  • @ValiRossi
    @ValiRossi 10 หลายเดือนก่อน

    Great tutorial.

  • @play_sports_and_read_books
    @play_sports_and_read_books 9 หลายเดือนก่อน +1

    14:25 i've seen in one of those c++ seminars that emit is nothing, it's literally there to make reading the code easier.
    It's literally defined as:
    #define emit

  • @saina-kuodanilova7723
    @saina-kuodanilova7723 ปีที่แล้ว

    thank you!

  • @santoshs4393
    @santoshs4393 ปีที่แล้ว

    Thanks! Very informative. I had used qt signal slot in past but was not this clear about various connection possibilities. NOW I am thinking how I can do this in native c++11/14 or 17... w/o qt in my non-ui projects.

    • @VelcodeCS
      @VelcodeCS  ปีที่แล้ว

      Seems like a fun side project. I suppose it depends on how many of the Qt features you need, but you'd more than likely need to deal with function pointers.

  • @anuraganand8649
    @anuraganand8649 2 ปีที่แล้ว +1

    Thanks

  • @vladimirvakhter4655
    @vladimirvakhter4655 2 ปีที่แล้ว

    This video is not about how S & S work in Qt, but about how to use S & S. Reading "how S & S work", I expected to learn more about the meta-object compiler.

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว +2

      I can see your dilemma, but I think the title is appropriate. For instance, I would think what you're looking for is about "how the meta-object compiler works" or S & S connections.

  •  2 ปีที่แล้ว

    Nice explanation, but lacks how slots and signals gets compiled, the difference between slots and signals or send message to object or other similar situation, in the final compiled executable!

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว +1

      There are definitely more things to know about signals and slots. My intent was to get a complete novice started. Perhaps I should put that on the thumbnail or title 🤔

    •  2 ปีที่แล้ว

      @@VelcodeCS no need, it is ok, maybe an advanced video would be more appreciated!

    •  2 ปีที่แล้ว

      @@VelcodeCS idea for new basic video: System.Windows.Forms::DoEvents() is the Microsoft for processing all pending messages (OS-UI) and Qt Creator is qApp->processEvents(QEventLoop::AllEvents); which allows, for example: button_onclick { button->enabled=false; for(a=0; aprocessEvents(QEventLoop::AllEvents); … long processing … } button->enabled=true; return; } this simple solution is also necessary whenever the CPU goes up 100%, and using qApp->processEvents(QEventLoop::AllEvents); will make it stay at 15% or less!

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว

      @ Good ideas! I've been busy finishing school, but I should have more time soon to get back to making videos. I use the processEvents function also for the progress bars.

  • @OndrejPopp
    @OndrejPopp 2 ปีที่แล้ว

    Thanks for the great explanation however... your design has one flaw maybe, because when the villagers react they prepare for an invation... 🤷‍♀️🤷🤷‍♀️🤷🤷🤷‍♀️🤷‍♀️🤷‍♀️ So now, what does that mean exactly? Should we invite these people or prepare for battle?

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว +1

      That's up to you. The reaction is the slot. What goes in the slot is up to the programmer.

    • @OndrejPopp
      @OndrejPopp 2 ปีที่แล้ว

      @@VelcodeCS Sure... but you are the programmer here, so I thought the villagers could be a bit confused about what "invation" really means... 🤷🤷‍♀️

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว

      Not necessarily, the purpose of the video is to explain signals/slots conceptually. No need to fill unnecessary gaps (video already long as is).

    • @OndrejPopp
      @OndrejPopp 2 ปีที่แล้ว

      @@VelcodeCS Maybe you don't get my point : 🙂 "invation" is a typo...

    • @VelcodeCS
      @VelcodeCS  2 ปีที่แล้ว

      Oh, I forget what I do/say on these. 😅

  • @jayleo2052
    @jayleo2052 ปีที่แล้ว

    That's how to use signal and slots,not how signal slots work