Results 1 to 2 of 2

Thread: QComboBox event

  1. #1
    Join Date
    Jan 2011
    Qt products

    Question QComboBox event


    I have created QCombox in UI and converted it in .py using Pyuic4. Now in my main py file i have imported this file and written an event for QCombox as follows

    name of QCombox is shotCB

    def on_shotCB_activated(self):
    print "A";

    but when i tried to run my py file, though i selected item once A got printed twice.

    again i tried

    def on_shotCB_currentIndexChanged(self):
    print "A";

    but this event also gave me same results i.e. printed A twice

    Can anybody tell me where i am going wrong?

  2. #2
    Join Date
    Mar 2009
    Brisbane, Australia
    Thanked 1,597 Times in 1,525 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows
    Wiki edits

    Default Re: QComboBox event

    The slot has been connected twice: possibly once by your code explicitly and once by the automatic connection mechanism triggered by the on_widget_signal() naming.

Similar Threads

  1. QComboBox menu mouse press event
    By San_Cou in forum Qt Programming
    Replies: 0
    Last Post: 30th January 2013, 18:18
  2. Qt/MFC Event Loop - stop MFC receiving event?
    By Kaylx in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2012, 19:57
  3. Replies: 10
    Last Post: 15th January 2010, 15:35
  4. Replies: 0
    Last Post: 23rd October 2008, 13:43
  5. no MouseButtonRelease event for QComboBox
    By Beluvius in forum Qt Programming
    Replies: 5
    Last Post: 31st March 2006, 13:58


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.