Python Forum
How to update the list of a combo box in a QTableView
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to update the list of a combo box in a QTableView
#5
(Feb-04-2022, 07:48 PM)Axel_Erfurt Wrote: The function UpdateArticlesModel only has print. Where is the database updated?

The 'articles' table does not get updated.
Only the 'positions' table gets updated (line 146).
(the list of the combo is populated by the data of the 'positions' table)

The articles model gets refreshed at line 67 (ok, I should have named it 'RefreshArticlesModel' instead of 'UpdateArticlesModel'):
@QtCore.pyqtSlot()
    def UpdateArticlesModel(self):
        print("Articles Form: Update Articles Model called!")
        if not self.ArticlesModel.select():
            print("Articles Form: " + self.ArticlesModel.lastError())
Reply


Messages In This Thread
RE: How to update the list of a combo box in a QTableView - by panoss - Feb-04-2022, 08:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] PyQt5 QTableView SQLite : edit cell HeinKurz 2 2,531 Mar-27-2023, 10:41 AM
Last Post: HeinKurz
Photo PySimpleGUI FilesBrowse enable event to update value in combo SamLiu 2 4,757 Mar-15-2023, 12:49 PM
Last Post: SamLiu
  [PyQt] QStyledItemDelegate and QTableView malonn 1 1,711 Feb-07-2023, 07:15 PM
Last Post: malonn
  [PyQt] QTableView set header labels HeinKurz 2 7,212 Jan-23-2023, 08:46 AM
Last Post: HeinKurz
  [PyQt] Determine whether text in QTableView cell is fully visible or not random_nick 0 1,031 Oct-27-2022, 09:29 PM
Last Post: random_nick
  [PyQt] QTableView: scroll to top cell of the screen random_nick 2 2,982 Oct-08-2022, 12:29 AM
Last Post: random_nick
  [PyQt] [Solved]Add a Blank Row To QTableView Extra 3 5,777 Oct-02-2022, 04:53 PM
Last Post: Extra
  Radio butto to enable/disable combo box in Tkinter cybertooth 5 5,706 Oct-09-2021, 07:30 AM
Last Post: cybertooth
  [PyQt] How to Copy-Paste a table from Office apps to QTableView? Vittorio 5 7,416 Aug-05-2021, 11:14 AM
Last Post: Axel_Erfurt
  [Tkinter] how to update label text from list Roshan 8 5,598 Apr-25-2020, 08:04 AM
Last Post: Roshan

Forum Jump:

User Panel Messages

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