Results 1 to 4 of 4

Thread: Displaying the result of SQL queries in tabular form in window without using .ui file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jul 2021
    Posts
    6
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Unhappy Tutorial Examples for TableModel view ,didn't run

    Quote Originally Posted by d_stranz View Post
    Why don't you study some of the Qt SQL examples? There are a lot of them, from basic to more advanced.

    }
    I have tried to follow some of these examples but I don't know why it does not run in my system[even after adding the required headerfiles]. Any suggestion for me to create small basic applications of my own?


    Added after 1 7 minutes:


    Quote Originally Posted by d_stranz View Post
    You need to make your QTableView and QLabel part of your MainWindow. Simply creating them as standalone widgets won't work.

    Why don't you study some of the Qt SQL examples. There are a lot of them, from basic to more advanced.

    }

    There's a sample code for TableModel Example https://doc.qt.io/qt-5.12/qtsql-tabl...model-cpp.html What's the createView function ? That's where I am getting the error. If I declare it in the .h file, it does not solve the issue either.

    It's a little demotivating when the examples don't run smoothly!
    Last edited by swati777999; 23rd November 2021 at 04:42.

Similar Threads

  1. Replies: 7
    Last Post: 1st December 2017, 15:27
  2. Replies: 1
    Last Post: 18th October 2011, 11:02
  3. present data in tabular form reading from a file
    By sachinmcajnu in forum Qt Programming
    Replies: 1
    Last Post: 2nd April 2011, 14:53
  4. Replies: 9
    Last Post: 19th November 2009, 09:18
  5. Replies: 1
    Last Post: 19th August 2007, 19:50

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.