Results 1 to 10 of 10

Thread: QTableView Splitter and pictures

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 2 Times in 1 Post

    Default Re: QTableView Splitter and pictures

    Thanks Marcel

    I followed your advice but have not much luck yet, I'm brand new you know.

    You said : //next, add the splitter to some container widget.

    Can you give an example?
    I thought that splitter already has a parent in it's constructor.
    The form now comes up with the view and the label only a few pixels in size.

    This is my code so far

    Qt Code:
    1. model->setTable("pix");
    2. model->setEditStrategy(QSqlTableModel::OnManualSubmit);
    3. model->select();
    4. QTableView *table = new QTableView;
    5. table->setModel(model);
    6. table->show();
    7. QLabel *label = new QLabel;
    8. QSplitter *split = new QSplitter(Qt::Vertical, centralwidget);
    9. split->addWidget(table);
    10. split->addWidget(label);
    To copy to clipboard, switch view to plain text mode 



    Thanks, Jean.
    Last edited by marcel; 29th December 2007 at 08:31. Reason: missing [code] tags

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.