Results 1 to 4 of 4

Thread: Connection problem with menubar using Designer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Thumbs up Re: Connection problem with menubar using Designer

    Quote Originally Posted by calhal View Post
    You've declared aboutAction inside your UI with QtDesigner, so you should refere to it like this:
    Qt Code:
    1. connect( &ui.aboutAction, SIGNAL(triggered()), this, SLOT(about()) );
    To copy to clipboard, switch view to plain text mode 

    If you run your code from console I guess you'll get message that object aboutAction doesn't exist.
    Actually what seemed to work is the following

    Qt Code:
    1. connect( ui.aboutAction, SIGNAL(triggered()), this, SLOT(about()) );
    To copy to clipboard, switch view to plain text mode 

    When would I use the &??

    I don't recal having to call ui.action when doing this...

    Well thank you for helping out :-)

  2. #2
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Connection problem with menubar using Designer

    Ups, I was writing fast from my memory

    I think the answer is in QtAssistant:
    Qt Code:
    1. bool QObject::connect ( const QObject * sender, const char * signal,
    2. const QObject * receiver, const char * method,
    3. Qt::ConnectionType type = Qt::AutoConnection ) [static]
    To copy to clipboard, switch view to plain text mode 
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

Similar Threads

  1. Signal-slots connection problem.
    By impeteperry in forum Qt Tools
    Replies: 26
    Last Post: 23rd January 2007, 14:33
  2. Basic: problem building designer application
    By kingslee in forum Qt Tools
    Replies: 2
    Last Post: 31st August 2006, 15:26
  3. connection problem
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2006, 22:14
  4. problem with designer
    By bashamehboob in forum Qt Tools
    Replies: 2
    Last Post: 12th April 2006, 07:46
  5. Facing problem with qt-4.1 designer
    By jnana in forum Qt Tools
    Replies: 4
    Last Post: 8th March 2006, 18:16

Tags for this Thread

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.