Results 1 to 3 of 3

Thread: QListView in MainWindow.

  1. #1
    Join Date
    Feb 2012
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default QListView in MainWindow.

    Hey,
    I was trying to add a QListView in my MainWindow.

    Could you help me with a really small example?

    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QListView in MainWindow.

    What have you tried? A QListView is just another widget, so any example of placing widgets into a main window is easily adapted. See also: QMainWindow::setCentralWidget() and layouts

  3. #3
    Join Date
    Nov 2006
    Location
    indonesia
    Posts
    55
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QListView in MainWindow.

    Hi,
    Like ChrisW67 answer, QListView is a widget. The sample how to use this widget is like QListView or QTableView. You can get more totural at QtDemo or from this link :

    http://www.digitalfanatics.org/proje...chapter13.html (maybe you can get error when compile this code)

    or from here :

    http://toto-share.com/2012/02/qt-qlistview-tutorial (I get this code running without modification.)

    Thank you.

    Myta212

Similar Threads

  1. Replies: 0
    Last Post: 6th November 2011, 10:22
  2. Recreating MainWindow
    By premroxx in forum Qt Programming
    Replies: 3
    Last Post: 22nd September 2011, 23:23
  3. Replies: 1
    Last Post: 12th April 2011, 10:53
  4. Replies: 1
    Last Post: 6th July 2010, 13:03
  5. MainWindow
    By amagdy.ibrahim in forum Newbie
    Replies: 6
    Last Post: 14th June 2008, 15:12

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.