Python Forum
Dropdown menu- Store variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropdown menu- Store variable
#2
Found the answer

advBasicOptions = ("Basic", "Advanced")
selection, okPressed = QInputDialog.getItem(self, "Select Basic or Advanced", "", advBasicOptions, 0, False)

if selection == advBasicOptions[0]:
print('Basic')
if selection == advBasicOptions[1]:
print('advanced')
Reply


Messages In This Thread
Dropdown menu- Store variable - by aking76 - Sep-10-2018, 05:11 PM
RE: Dropdown menu- Store variable - by aking76 - Sep-11-2018, 01:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Dropdown box showing weird entry cybertooth 4 2,231 Aug-16-2021, 03:45 PM
Last Post: deanhystad
  [Tkinter] tkinter.Menu – How to make text-variable? Sir 3 5,661 Mar-10-2021, 04:21 PM
Last Post: Sir
  [Tkinter] populating dropdown from Method mikisDW 2 3,869 Apr-06-2020, 08:06 PM
Last Post: mikisDW
  Option dropdown with Pyinquerer julio2000 0 1,546 Mar-22-2020, 04:11 PM
Last Post: julio2000
  [Tkinter] Choose from dropdown list and then do something? Selfiatus1 2 5,449 Jun-07-2019, 08:43 PM
Last Post: Selfiatus1
  printing option menu variable in label in Tkinter SmokerX 1 6,635 Jan-18-2018, 07:36 PM
Last Post: SmokerX

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020