Results 1 to 6 of 6

Thread: Extract data from db then pass it to qtreeview

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jul 2012
    Posts
    8
    Qt products
    Platforms
    Windows
    Thanked 3 Times in 3 Posts

    Default Re: Extract data from db then pass it to qtreeview

    Hi,

    I've read so many documents but still can't figure out how to do it. Please help me wysota. I'm really a newbie in programming. What I have so far is a UI for it and convert it to python file. Then I have a connection python file. In my main.py file, this is the code:

    from UI import Ui_MainWindow
    from connection import createConnection

    class Form(QtGui.QWidget):
    def __init__(self,parent=None):
    super(Form,self).__init__(parent)
    self.ui = UI()
    self.ui.setupUi(self)

    def mymodel(self.model):
    self.proxyModel.setSourceModel(model)
    self.sourceView.setModel(model)


    after that...I don't know the code. I don't know how to query to a specific column in my table and if it finds the value,it passes it to the treeview. Please help me.


    Best Regards,
    Nethan

  2. The following user says thank you to nethanjavier for this useful post:


Similar Threads

  1. How to extract data from QFormLayout?
    By szisziszilvi in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2011, 09:18
  2. Extract Item from the QTreeView
    By sajis997 in forum Qt Programming
    Replies: 2
    Last Post: 25th March 2011, 08:40
  3. extract data from photos
    By timmu in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2009, 09:38
  4. How can I extract raw data from a QPixmap?
    By ricardo in forum Qt Programming
    Replies: 3
    Last Post: 16th September 2009, 08:31
  5. extract data from sqlTablemodel
    By peace_comp in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2008, 19:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.