Results 1 to 2 of 2

Thread: signals while using Dynamic UI

  1. #1
    Join Date
    Jan 2011
    Posts
    23
    Qt products
    Platforms
    Windows

    Question signals while using Dynamic UI

    Hi Guys,

    I have created a QTableWidget in which i am adding rows on runtime. One of the column consists of combobox (using setCellWidget). Now, i want to create a definition which will be invoked on currentIndexChanged signal of the same combobox. But, here as i am creating this combobox dynamically iso i am facing a small problem.
    Ex. cmb_a is created using setCellWidget at runtime. Then, writing a definition " def on_cmb_a_currentIndexChanged(self): " is not working out.
    Can someone plz suggest me a solution for this.

    Thanks in advance

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: signals while using Dynamic UI

    QObject::connect() the signal to the slot yourself (or call QMetaObject::connectSlotsByName() like the uic generated code does).

Similar Threads

  1. Slots/Signals with dynamic library
    By astong in forum Qt Programming
    Replies: 1
    Last Post: 23rd August 2011, 23:42
  2. Replies: 1
    Last Post: 20th January 2011, 17:17
  3. Replies: 1
    Last Post: 24th October 2010, 11:09
  4. Dynamic widgets adding and connecting signals& slots
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 22nd May 2009, 12:36
  5. QThread and signals (linux/UNIX signals not Qt Signals)
    By Micawber in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2007, 22:18

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.