Results 1 to 4 of 4

Thread: Borland TDBCtrlGrid equivalent available ?

  1. #1
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Borland TDBCtrlGrid equivalent available ?

    Hello,

    I'm rather new to QT programming (have 20 years of programming experience though), and I am trying to switch to QT for some simple database applications.

    I am looking for an equivalent of the TDBCtrlGrid widget that is present in Borland Delphi and C++ Builder.

    It is a database widget with different rows. On the first row, you can put any data-aware widgets in the user-interface designer, and lay them out as you like. You can add text and lines and whatever also.

    When you run the application, you get a table with different rows showing the data of your records.

    I'm using this component quite heavily, because it is very convenient to provide a user-friendly interface.

    Is something similar possible in QT ? I haven't found anything in the documentation.

    Best regards,
    Marc

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Borland TDBCtrlGrid equivalent available ?

    Not directly. But you can use QScrollArea with QVBoxLayout and when you add a new row, instantiate a component of your choice (which would probably be composed of some other widgets arranged into a horizontal layout) and add it to the layout.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Re: Borland TDBCtrlGrid equivalent available ?

    Hello Wysota,

    Thanks for the quick reply.

    But that would mean that I have to instantiate a component for each record in the database right ? And then keep track of which component is linked to which record.

    That isn't practical in a database with thousands of records.

    Best regards,
    Marc

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Borland TDBCtrlGrid equivalent available ?

    Quote Originally Posted by marcvanriet View Post
    That isn't practical in a database with thousands of records.
    Having several thousand components on the screen is impractical at all. It's much more practical to use the default behaviour of QTableView and forget about TDBCtrlGrid.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. is qreal equivalent to float32?
    By pdoria in forum Qt Programming
    Replies: 9
    Last Post: 22nd July 2009, 22:57
  2. get ASCII equivalent data
    By navi1084 in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2009, 04:13
  3. Qt OpenGL equivalent of glutIdleFunc()?
    By HappySmileMan in forum Qt Programming
    Replies: 2
    Last Post: 23rd July 2008, 21:56
  4. Replies: 2
    Last Post: 23rd April 2006, 01:02
  5. what's the equivalent with DPtoLP in windows
    By cocalele in forum Qt Programming
    Replies: 6
    Last Post: 1st March 2006, 06:57

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.