Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このコードは機能しています:
QRect r = QApplication::desktop()->availableGeometry(); QRect main_rect = this->geometry(); main_rect.moveTopRight(r.topRight()); this->move(main_rect.topLeft());
このコードは画面の位置に取り組んでいます..しかし、私は画面の右側に揃えたい..
何か考えはありますか?
ありがとうございました..
このようなメインレイアウトに setAlignment を使用する必要があると思います
QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->setAlignment(Qt::AlignRight);