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. How to write qml signal Variadic arguments
Forum Updated to NodeBB v4.3 + New Features

How to write qml signal Variadic arguments

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 965 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.
  • FlacoDanzigerF Offline
    FlacoDanzigerF Offline
    FlacoDanziger
    wrote on last edited by
    #1

    I want to write a qml signal that takes n QString arguments ( foo(QString, ...) which the slot will be on the CPP side.

    Thanks

    kshegunovK 1 Reply Last reply
    0
    • FlacoDanzigerF FlacoDanziger

      I want to write a qml signal that takes n QString arguments ( foo(QString, ...) which the slot will be on the CPP side.

      Thanks

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

      @FlacoDanziger
      As far as my knowledge of Qt goes, which is pretty decent, you can't ... and you shouldn't. If you want to send a number of QStrings use QStringList. A signal-slot connection is a bit more than a regular function call and variadic arguments can't be packed (when you have queued connections for example). Not to mention it's a type safety nightmare ...

      Read and abide by the Qt Code of Conduct

      FlacoDanzigerF 1 Reply Last reply
      1
      • kshegunovK kshegunov

        @FlacoDanziger
        As far as my knowledge of Qt goes, which is pretty decent, you can't ... and you shouldn't. If you want to send a number of QStrings use QStringList. A signal-slot connection is a bit more than a regular function call and variadic arguments can't be packed (when you have queued connections for example). Not to mention it's a type safety nightmare ...

        FlacoDanzigerF Offline
        FlacoDanzigerF Offline
        FlacoDanziger
        wrote on last edited by
        #3

        @kshegunov 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