Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [PySide]How to emit a multi-arguments signal.
Qt 6.11 is out! See what's new in the release blog

[PySide]How to emit a multi-arguments signal.

Scheduled Pinned Locked Moved Language Bindings
3 Posts 2 Posters 4.0k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Dear community,

    I got a TypeError: findPrevious(QString) only accepts 1 arguments, 3 given!

    but, I want to emit a multi-arguments signal.
    How can I do it?

    @class FindDialog(QtGui.QDialog):
    findPrevious = QtCore.Signal(str, QtCore.Qt.CaseSensitive)
    findNext = QtCore.Signal(str, QtCore.Qt.CaseSensitive)

    def findClicked(self):
    text = self.lineEdit.text()
    if self.caseCheckBox.isChecked:
    cs = QtCore.Qt.CaseSensitive
    else:
    cs = QtCore.Qt.CaseInsensitive
    if self.backwardCheckBox.isChecked:
    self.findPrevious.emit(text, cs)
    else:
    self.findNext.emit(text, cs)
    @

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      what function?

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        This one.

        @self.findPrevious.emit(text, cs)@

        But, I think signal can not emit multi-arguments in PySide.

        However, C++ can it.

        @emit findPrevious(text, cs);@

        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