Which component to use in Pyqt4 to display records of an on-screen SQL query?

Asked

Viewed 400 times

3

I’m developing a graphical Python desktop application using Pyqt4 (Qt Designer), my doubt is about which component use to display on my screen frmTelaPesqAluno records of an SQL query, and how to use it? It is a component similar to the DataGridView Visual Studio or a Grid that I need to use to list the query records.

Follows image of the screen I’m developing: Formulário de pesquisa de Alunos.

1 answer

3


  • I am in doubt if I should use a Qtablewidget or Qtableview, I have never used a grid in Python.

  • To QTableView is simpler and is actually used internally by QTableWidget. Almost always you will be with the most complete and that allows better organization of the code. The simplest is not compared to the existing in . Net.

  • There is an example of Qtableview?

  • It’s full of examples but not what you wanted in the question: https://www.google.com/search?q=qtablew+example

  • I want to send the result of an SQL query to Qtableview.

  • Then you have to ask another question but you have to show what you’ve tried to do.

  • I will try to use Qtablewidget from the example you gave me.

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.