Results 1 to 4 of 4

Thread: control not passing from dialog to code

  1. #1
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default control not passing from dialog to code

    hello everybody
    i have a dialog in which i have a checkbox and a few buttons. On press of ok button respective slot is called.I have used inherited this dialog code class and in my class, i have
    Qt Code:
    1. connect(pbnOK,SIGNAL(clicked()),this,SLOT(on_pbnOK_clicked()));
    To copy to clipboard, switch view to plain text mode 
    what i expect here is on pressing on ok button( pbnOK) slot on_pbnOK_clicked() will be called but this is not happening.
    While designing dialog i have made connection that on clicking of pbnOK should accept().
    i know its very naive but i couldn't find way out

    thankyou
    cya
    quick nitin

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: control not passing from dialog to code

    Are there any messages on the console? How did you define that slot? Is it in slots section? Do you have Q_OBJECT macro in your class definition?

  3. The following user says thank you to jacek for this useful post:

    quickNitin (28th June 2006)

  4. #3
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: control not passing from dialog to code

    there are no error message related to it. I established the fact that control is not coming to slot on_pbnOK_clicked() by use of gdb. I have used Q_OBJECT as well.

  5. #4
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: control not passing from dialog to code

    haah, i find a silly silly mistake.
    by mistake i commented the code
    Qt Code:
    1. public slots:
    To copy to clipboard, switch view to plain text mode 

    Problemm get solved after that.
    thaks jacek for solving the issue.

    cya
    quick nitin

Similar Threads

  1. how to get code for dialog in qt4.1.2
    By quickNitin in forum Newbie
    Replies: 8
    Last Post: 8th June 2006, 14:35
  2. Dialog positioning in GNOME
    By simk in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2006, 09:41
  3. Replies: 6
    Last Post: 3rd February 2006, 09:48
  4. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.