Hi Everyone, I recently got started with Qt and I'm having an issue with my layout management. In the following code I'd like to have the tableView resize to that of the parent widget. Do I have to put the layout in a QMainWindow or is there some method I can call on QTableView. thanks so much.
Qt Code:
#include "acme.h" #include "dataModel.h" Ramble::Ramble(){ //create our ui QWidget parent; //pack top and bottom pane top_pane->addWidget(tags); top_pane->addWidget(context_view); bottom_pane->addWidget(library); //create and populate our database dataModel* music_data_model = new dataModel(this); library->setModel(table_model); //set up our layout main_window->addLayout(top_pane); main_window->addLayout(bottom_pane); setLayout(main_window); } Ramble::~Ramble(){}To copy to clipboard, switch view to plain text mode
Bookmarks