Python Forum
PyQt, Open a Table when a row is selected populating it with the row values
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyQt, Open a Table when a row is selected populating it with the row values
#13
(Dec-17-2018, 07:15 PM)Axel_Erfurt Wrote: Ok, it creates a database with no entries.

If there are entries then you want to fill the ComboBoxes? Or the table?

I have a DB Viewer on github that shows how to load a database into QTableWidget
After the the comboBoxes are filled correctly it will saved in QtableWidget in the database.
There are entries in the database in QtableWidget.
The columns are product_id,product_name,inventory_received,starting_inventory,product_price and values for each rows.The content of my database user.db is shown in the file but I intended to add price.

I have three comboboxes
first comboBox is product id
second comboboxes is product_name
third comboBoxes is price.

I want the second Combobox to list all the product.That is working perfectly.
I want the first comboBox to reflect the product_id of the selected product_name.
I want the third comboBox to reflect the price of the selected product_name.
How can I achieve this behavior?I have checked out your work on GitHub.But, I am not getting the database to work on my side even when add a database on my system into the path.
Reply


Messages In This Thread
RE: PyQt, Open a Table when a row is selected populating it with the row values - by rarevesselt - Dec-18-2018, 08:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] populating dropdown from Method mikisDW 2 3,916 Apr-06-2020, 08:06 PM
Last Post: mikisDW
  Populating a Listbox from db Query DT2000 2 6,539 Feb-25-2019, 05:45 PM
Last Post: DT2000
  PyQt Selected row in Table Widget rarevesselt 3 23,864 Dec-07-2018, 07:00 PM
Last Post: rarevesselt

Forum Jump:

User Panel Messages

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