先提交下
This commit is contained in:
@ -26,16 +26,17 @@ NavBar::NavBar(ConfigResponse *configResponse,QWidget *parent) :
|
||||
else {
|
||||
getLogoFromLocal();
|
||||
}
|
||||
this->setLayout(nullptr);
|
||||
int n = buttonStructs.length();
|
||||
int x = (width() - height()*n) / 2;
|
||||
for (auto buttonStruct : buttonStructs) {
|
||||
MyButton *myButton = new MyButton(buttonStruct, height(), height(), &buttons);
|
||||
MyButton *myButton = new MyButton(buttonStruct, height(), height(), &buttons,this);
|
||||
myButton->setGeometry(x, 0, height(), height());
|
||||
myButton->show();
|
||||
connect(myButton, &MyButton::clicked1, mainWindowLayout, &MainWindowLayout::clickButton);
|
||||
x += height();
|
||||
buttons << myButton;
|
||||
}
|
||||
this->setLayout(nullptr);
|
||||
}
|
||||
|
||||
NavBar::~NavBar() {
|
||||
@ -63,7 +64,7 @@ void NavBar::paintEvent(QPaintEvent *event) {
|
||||
|
||||
}
|
||||
void NavBar::resizeEvent(QResizeEvent *event) {
|
||||
QWidget::resizeEvent(event);
|
||||
QWidget::resizeEvent(event);
|
||||
int n = buttonStructs.length();
|
||||
int x = (width() - height()*n) / 2;
|
||||
for(auto button:buttons){
|
||||
|
Reference in New Issue
Block a user