Skip to content

Commit

Permalink
set widget owneship in mainwindow
Browse files Browse the repository at this point in the history
  • Loading branch information
royqh1979 committed Nov 30, 2024
1 parent 598a05b commit e6a9ebf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RedPandaIDE/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ MainWindow::MainWindow(const QStringList& filesToOpenAfterStart, QWidget *parent
// status bar

//statusBar takes the owner ships
mFileInfoStatus=new QLabel();
mFileEncodingStatus = new LabelWithMenu();
mFileModeStatus = new QLabel();
mFileInfoStatus=new QLabel(this);
mFileEncodingStatus = new LabelWithMenu(this);
mFileModeStatus = new QLabel(this);

mFileInfoStatus->setStyleSheet("margin-left:5px; margin-right:5px");
mFileEncodingStatus->setStyleSheet("margin-left:5px; margin-right:5px");
Expand Down Expand Up @@ -186,7 +186,7 @@ MainWindow::MainWindow(const QStringList& filesToOpenAfterStart, QWidget *parent
mVisitHistoryManager->load();

//toolbar takes the owner
mCompilerSet = new QComboBox();
mCompilerSet = new QComboBox(this);
mCompilerSet->setMinimumWidth(200);
mCompilerSet->setSizeAdjustPolicy(QComboBox::AdjustToContents);
ui->toolbarCompilerSet->insertWidget(ui->actionCompiler_Options, mCompilerSet);
Expand Down

0 comments on commit e6a9ebf

Please sign in to comment.