Fix Qt widget embedding: pages rendered as floating windows instead of tabs
Move centralWidget assignment before page creation to fix use of uninitialized pointer. Use Qt::Widget flags when pages have a parent (embedded in QStackedWidget) and pass centralWidget as parent for all lazily-created pages (messagePage, signMessagePage, verifyMessagePage). Also fix TransactionView which unconditionally set FramelessWindowHint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,10 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
|
||||
model(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::Window);
|
||||
if (parent)
|
||||
setWindowFlags(Qt::Widget);
|
||||
else
|
||||
setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::Window);
|
||||
|
||||
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
|
||||
ui->addButton->setIcon(QIcon());
|
||||
|
||||
Reference in New Issue
Block a user