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. Qt Script: Determine widget objectName in a slot function/__qt_sender__
Forum Updated to NodeBB v4.3 + New Features

Qt Script: Determine widget objectName in a slot function/__qt_sender__

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.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.
  • C Offline
    C Offline
    cutefoxy
    wrote on last edited by
    #1

    Hello,

    this is my first question here. I'm just starting with Qt, in more detail with Qt Script inside an app. So pls. be patient!

    In a script slot function is there a way to determine the objectName of the widget which triggered the event? And how can I use __qt_sender__?

    Many thanks and greetings
    cutefoxy

    kshegunovK 1 Reply Last reply
    0
    • C cutefoxy

      Hello,

      this is my first question here. I'm just starting with Qt, in more detail with Qt Script inside an app. So pls. be patient!

      In a script slot function is there a way to determine the objectName of the widget which triggered the event? And how can I use __qt_sender__?

      Many thanks and greetings
      cutefoxy

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      Isn't Qt Script deprecated? If it is (which I believe is correct), I strongly advise you not to start with it in the first place.

      Read and abide by the Qt Code of Conduct

      C 1 Reply Last reply
      0
      • kshegunovK kshegunov

        Isn't Qt Script deprecated? If it is (which I believe is correct), I strongly advise you not to start with it in the first place.

        C Offline
        C Offline
        cutefoxy
        wrote on last edited by
        #3

        @kshegunov

        "Deprecated" doesn't mean it's not used in already existing apps (as in my case). And "deprecated" doesn't mean it can be used in current projects.

        Many thanks and greetings
        cutefoxy

        kshegunovK 1 Reply Last reply
        0
        • C cutefoxy

          @kshegunov

          "Deprecated" doesn't mean it's not used in already existing apps (as in my case). And "deprecated" doesn't mean it can be used in current projects.

          Many thanks and greetings
          cutefoxy

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by kshegunov
          #4

          @cutefoxy said in Qt Script: Determine widget objectName in a slot function/__qt_sender__:

          "Deprecated" doesn't mean it's not used in already existing apps (as in my case). And "deprecated" doesn't mean it can be used in current projects.

          Of course, I meant that as it being deprecated you're discouraged from using it for new development. And it will (in all probability) be removed in Qt 6, so that's also a thing to bear in mind. That's why it'd seemed as quite the unusual choice for someone "just starting with Qt".

          Kind regards.

          Read and abide by the Qt Code of Conduct

          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