Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6538989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:48:09+00:00 2026-05-25T10:48:09+00:00

I just started maintaining a set of embedded Python plugins for a Qt application.

  • 0

I just started maintaining a set of embedded Python plugins for a Qt application. I’m also new to both PyQt and Python, so bear with me.

I have an implementation of a QTreeWidget in one dialog where the “expanded” signal is not being caught by the corresponding handler. I have another dialog where it works just fine.

In the problem dialog, I can verify that the connect was successful.

connected = wdg.connect(wdg.treeView_,SIGNAL("expanded(QTreeViewItem*)"), wdg.expanded)

evaluates to True. When I click on the child indicators to expand an item, the [+] signs change to a minus, but nothing else happens. Likewise, when I click on the [-], it toggles back to [+]. I have set the ChildIndicatorPolicy to initially set the indicator to SHOW in both cases.

In the dialog that works OK, when the user clicks on the plus sign, the ‘expanded’ handler is executed. Only the indicator toggles when it is clicked.

My handler code is simply:

def expanded(self, item):
    logging.debug("In expanded handler")

I have a breakpoint at the logging call, but the statement is never reached.

I the failing dialog, I have another signal that’s connected immediately before the one above, and it works just fine:

wdg.connect(wdg.treeView_,SIGNAL("currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)"), wdg.itemChanged)

Is there anything that could prevent an expanded signal from firing or being caught? Another event perhaps? What should I be looking for? I realize that my nomenclature may be a bit off, and I welcome any correction in that regard as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:48:10+00:00Added an answer on May 25, 2026 at 10:48 am

    I found the problem. Despite the misleading name, the object is a QTreeWidge. When I replaced the name of the signal from "expanded" to "itemExpanded" and changed the parameter type to a QTreeWidgetItem*, everything worked.

    wdg.connect(wdg.treeView_, SIGNAL("itemExpanded(QTreeWidgetItem*)"), wdg.expanded)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started using fadein/fadeout - it's functioning but with problems. I have a set
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I just started using SVN, and I have a cache directory that I don't
I am now maintaining a legacy VBA/Access 2000 application for a client. They have
Just started designing a database which I have not done before. And am wondering
Just started working with android and ran into a small problem. I am have
I just started studying C++, and I met this new guy: ->. I was
just started using JPA today, so i'm preety new to it. How would one
Just started using carrierwave with Rails and things have been going smoothly with one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.