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. Signals and slots run function. QT5
QtWS25 Last Chance

Signals and slots run function. QT5

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.2k Views
  • 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.
  • A Offline
    A Offline
    avengerweb
    wrote on last edited by
    #1

    in general, I need to run the function on signal:
    @connect (& accesManager, SIGNAL (finished (QNetworkReply *)), this, MainWindow :: someFunction (QNetworkReply *));@

    That just is not tried, as such a thing?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      [quote author="avengerweb" date="1375945483"]That just is not tried, as such a thing?[/quote]

      You need to rephrase this.

      In your connect statement, you need to connect to a slot or a function pointer if you are using new connect syntax.

      (Z(:^

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hareen Laks
        wrote on last edited by
        #3

        You need to declare your_ someFunction _ as a SLOT.

        Then connect like this.

        connect (& accesManager, SIGNAL (finished (QNetworkReply *)), this, SLOT(someFunction (QNetworkReply *)));

        Slots can also use as normal functions.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          Hi, New_Signal_Slot_Syntax and Old_Signal_Slot_Syntax can not be mixed in one connection.

          Please read the documentation of QObject::connect()

          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