From fa3ad51059df0999e0c828d8f458277ad064f265 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 11 Nov 2020 19:38:30 +0800 Subject: setMargin() disappeared? --- qmidiplayer-desktop/qmpsettingswindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp index 03e4cd1..d0998f2 100644 --- a/qmidiplayer-desktop/qmpsettingswindow.cpp +++ b/qmidiplayer-desktop/qmpsettingswindow.cpp @@ -134,7 +134,7 @@ void qmpSettingsWindow::registerSoundFontOption() { QWidget *sfpanel = new QWidget(); sfpanel->setLayout(new QVBoxLayout); - sfpanel->layout()->setMargin(0); + sfpanel->layout()->setContentsMargins(0, 0, 0, 0); QTableWidget *twsf = new QTableWidget(); twsf->setColumnCount(2); twsf->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeMode::ResizeToContents); @@ -146,7 +146,7 @@ void qmpSettingsWindow::registerSoundFontOption() sfpanel->layout()->addWidget(twsf); QWidget *controls = new QWidget(); controls->setLayout(new QHBoxLayout); - controls->layout()->setMargin(0); + controls->layout()->setContentsMargins(0, 0, 0, 0); QPushButton *pbsfadd = new QPushButton(style()->standardIcon(QStyle::StandardPixmap::SP_DialogOpenButton), QString()); QPushButton *pbsfrem = new QPushButton(style()->standardIcon(QStyle::StandardPixmap::SP_DialogDiscardButton), QString()); QPushButton *pbsfmup = new QPushButton(style()->standardIcon(QStyle::StandardPixmap::SP_ArrowUp), QString()); @@ -580,7 +580,7 @@ QGridLayout *qmpSettingsWindow::pageForTab(std::string tab) QFileEdit::QFileEdit(QWidget *par): QWidget(par) { QHBoxLayout *layout = new QHBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); le = new QLineEdit(this); layout->addWidget(le); tb = new QToolButton(this); -- cgit v1.2.3