Results 1 to 7 of 7

Thread: connect() variable passing issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: connect() variable passing issue

    Are you talking about some specific readready() signal or some coded by you?

  2. #2
    Join Date
    Dec 2010
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Re: connect() variable passing issue

    my fault type-o, I mean the readyread() signal that is standard with the a QNetworkReply instance. (it emit's automatically when the http response has data ready to be written somewhere.) It's not a signal i wrote, it comes with the QNetworkReply

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: connect() variable passing issue

    One idea* is:
    Create a slot without parameters in some place with access to data string. Connect readyread() with this slot.
    Declare a signal with a string parameter.
    And in the first slot you can emit the other signal with parameter (which will be connected to your slot that expects a string)

    *You must think about other ideas all depends on how your classes are designed
    Or even direct function call, slots are member functions, so can be called just like any other member function.

    //Consider using QString instead std::string.

Similar Threads

  1. Replies: 12
    Last Post: 7th September 2010, 12:53
  2. Replies: 1
    Last Post: 28th March 2010, 05:52
  3. Issue using connect, what am I missing?
    By technoViking in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2010, 05:11
  4. qt signal/slot auto-connect issue
    By parnedo in forum Qt Programming
    Replies: 9
    Last Post: 16th July 2009, 12:55
  5. Replies: 3
    Last Post: 8th June 2007, 20:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.