I think I use layouts =)
Example1:
MainWindow
::MainWindow(QWidget *parent
){
socket = new LHCPSocket;
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), mdir("messages.txt")
{
QTabWidget* tabw = new QTabWidget;
QWidget* cpwidget = new QWidget;
QVBoxLayout* playout = new QVBoxLayout;
QGridLayout* pgrid = new QGridLayout;
socket = new LHCPSocket;
QWidget* cwidget = new QWidget;
QVBoxLayout* toplayout = new QVBoxLayout;
QGridLayout* grid = new QGridLayout;
To copy to clipboard, switch view to plain text mode
Example2:
toplayout->addWidget(new ConnectBar(socket,mdir.getMsgInfo("SHUTDOWN_SERVER")));
toplayout->addWidget(map);
toplayout->addWidget(supportb);
toplayout->addWidget(new ConnectBar(socket,mdir.getMsgInfo("SHUTDOWN_SERVER")));
toplayout->addWidget(map);
toplayout->addWidget(supportb);
To copy to clipboard, switch view to plain text mode
Due to copyright material I can't post more "explaining" code... but maby this helped you a bit?
Bookmarks