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 8867289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:59:34+00:00 2026-06-14T16:59:34+00:00

I just started using pyqt4 and am stuck on how to change a combobox

  • 0

I just started using pyqt4 and am stuck on how to change a combobox list from another combobox. Is there a example of sometype that shows how to work this method.

Do I use a if, else statement to change the option for combobox_2?

ex.

Combobox_1 has a list of 1,2,3. Combobox_2 has a list of a,b,c or d,e,f or g,h,i.

If 1 is selected in Combobox_1, Combobox_2 it will show a,b,c.

If 2 is selected in Combobox_1, Combobox_2 will show d,e,f.

If 3 is selected in Combobox_1, Combobox_2 will show g,h,i.

thanks

  • 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-06-14T16:59:35+00:00Added an answer on June 14, 2026 at 4:59 pm

    What you want to do is something like this:

    def __init__(self):
        ...
        self.items = {'1':['a','b','c'],'2':['d','e','f'],'3':['g','h','i']}
        self.Combobox_1.activated[str].connect(self.on_combo_activated)
        ...
    
    ...
    
    def on_combo_activated(self, text):
        self.Combobox_2.clear()
        self.Combobox_2.addItems(self.items[text])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using rapidxml. I 1st create an xml file to read from.
Just started using Java (for Android, if that matters) and all I want is
I just started using Solrnet in my application only to discover that using the
I just started using LISP, coming from a background in C. So far its
I just started using C++ VS2008, and downloaded an archive of samples from MSDN.
I just started using Caliburn.Micro and I've noticed in all the examples that the
I just started using Maven and I read that plugins are additional components that
I just started using a javascript engine from Microsoft(of IE9?) for developing both desktop
I just started using the WPF WebBrowser that is included in Net 3.5 SP1.
I just started using SVN, and I have a cache directory that I don't

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.