Results 1 to 5 of 5

Thread: Problem with connection

  1. #1

    Default Problem with connection

    Can someone please tell me how can I connect my toolbar ACTION with some some void private slots ??? It's emergency THX

  2. #2
    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: Problem with connection

    And what is the problem? Be a little more specific and show some code if you have to.

    You don't know how to make a connection?
    Read the signal and slots documentation

    Is private slots the problem?
    There is no problem here, private slots are available for connection, they are only private when executed as normal member functions.
    //this is somehow an incomplete answer, since the slot execution invoked by connect is done inside the object itself - but this is "Qt internals" already and the first answer is enough for most users

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with connection

    Or maybe he means QAction, but the answer is the same, check the docs or post a smart question

  4. #4
    Join Date
    Apr 2011
    Posts
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with connection

    Or maybe he needs a simple example:

    Try this:

    Qt Code:
    1. connect (ui->actionName, SIGNAL(triggered()), SLOT(slotName()));
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem with connection

    It's emergency THX
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. DB Connection Problem
    By ktmdwn in forum Qt Programming
    Replies: 13
    Last Post: 4th August 2010, 15:12
  2. SQL Connection Problem
    By Utku in forum Installation and Deployment
    Replies: 3
    Last Post: 25th October 2009, 13:21
  3. connection Problem
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 2nd August 2007, 17:59
  4. SQL connection problem
    By Mrdata in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2007, 19:14
  5. connection problem
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2006, 22:14

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.