Thx for reply
My program is based on the QVBoxLayout, i don't want to write it again and using GridLaout. Mayby it is other easy way to fix it?
Look how i " use Layout Management", i think it mayby can show my problem and somebody show me the right way:/
QVBoxLayout *main_layout=new QVBoxLayout;
QHBoxLayout *first_line=new QHBoxLayout;
QHBoxLayout *second_line=new QHBoxLayout;
QHBoxLayout *third_line=new QHBoxLayout;
To copy to clipboard, switch view to plain text mode
And then i add Widgets to first,second and thirs layout.
I add images for any of this layouts where and then i draw grap on this images.
Look how i add images.
image1.load("C:/Project/image1.jpg");
place_for_image1
->setPixmap
(QPixmap::fromImage(image1
));
image2.load("C:/Project/image2.jpg");
place_for_image2
->setPixmap
(QPixmap::fromImage(image2
));
image3.load("C:/Project/image3.jpg");
place_for_image3
->setPixmap
(QPixmap::fromImage(image3
));
QLabel *place_for_image1=new QLabel;
QImage image1 = QImage(1000,200, QImage::Format_RGB32);
image1.load("C:/Project/image1.jpg");
place_for_image1->setPixmap(QPixmap::fromImage(image1));
QLabel *place_for_image2=new QLabel;
QImage image2 = QImage(1000,200, QImage::Format_RGB32);
image2.load("C:/Project/image2.jpg");
place_for_image2->setPixmap(QPixmap::fromImage(image2));
QLabel *place_for_image3=new QLabel;
QImage image3 = QImage(1000,200, QImage::Format_RGB32);
image3.load("C:/Project/image3.jpg");
place_for_image3->setPixmap(QPixmap::fromImage(image3));
To copy to clipboard, switch view to plain text mode
And then i add it to the layouts :
...
firstLine->addWidget(place_for_image1);
secondLine->addWidget(place_for_image2);
secondLine->addWidget(place_for_image3);
firstLine->addWidget(place_for_image1);
secondLine->addWidget(place_for_image2);
secondLine->addWidget(place_for_image3);
To copy to clipboard, switch view to plain text mode
.....
Then i add other widgets(dials,labels,lcd)
Finally i build Main Layout and set it.
main_layout->addLayout(first_line);
main_layout->addLayout(second_line);
main_layout->addLayout(third_line);
setLayout(main_layout);
main_layout->addLayout(first_line);
main_layout->addLayout(second_line);
main_layout->addLayout(third_line);
setLayout(main_layout);
To copy to clipboard, switch view to plain text mode
Mayby now anybody can help me with my problem,but without big changes in code.
Bookmarks