Results 1 to 6 of 6

Thread: QTableView

  1. #1
    Join Date
    Jun 2009
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QTableView

    Lykurg :: a) please also note our Newbie section
    ready
    Qt Code:
    1. QTableView *gridclientes = crearvista(QObject::tr("Mantenimiento"),&tabla);
    2. gridclientes->show();
    To copy to clipboard, switch view to plain text mode 
    Hi i am new thanks for the help,
    i created a tablegrids for a test application.. but i have a problem
    The problem is: i can show my table with gridclientes->show(); , but this is showed like in a modalmessage. How i do to "render" the QTABLEVIEW to a element in the form UI. for example y have a element Layout(QVBoxLayout)..
    i want to put the qtableview inside that..


  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: QTableView

    Call QLayout::addWidget() on the widget.
    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
    Jun 2009
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView

    please can you give a example?

  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: QTableView

    Qt Code:
    1. Layout->addWidget(gridclients);
    To copy to clipboard, switch view to plain text mode 
    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.


  5. #5
    Join Date
    Jun 2009
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy Re: QTableView

    i tried that buttt always said

    error: `Layout' undeclared (first use this function)
    Last edited by wysota; 26th June 2009 at 08:42.

  6. #6
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView

    Layout it's a variable which you should create, i.e.
    Qt Code:
    1. ...
    2. MyWidget *myWidget = new MyWidget();
    3. QVBoxLayout *layout = new QVBoxLayout(this);
    4. layout->addWidget(myWidget);
    5. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Replies: 2
    Last Post: 7th June 2009, 10:47
  2. Replies: 3
    Last Post: 29th January 2009, 08:38
  3. QTableView in ui with model/delegate
    By tpf80 in forum Qt Programming
    Replies: 7
    Last Post: 6th November 2008, 23:00
  4. make QTableView work as a multi-column list view
    By wesley in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2008, 14:43
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.