1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Qtでウィンドウサイズを固定したときにマウスポインタがリサイズできそうな表示をしないようにする

Posted at

この記事について

Qtウィジェットアプリケーションで、ウィンドウサイズを固定したときに画像のような矢印を出さないようにする方法です。
※ここで出てくる画像はQtCreator4.9.2を使っています。
右下カーソル.png真横カーソル.png

こんな検索をしたことがある人におすすめ!

  • Qt リサイズ 矢印 消す
  • Qt カーソル 変更
  • Qt マウスカーソル 設定 どこ

消す方法

2ステップあります。まずは以下の1行をMainWindowのコンストラクタに追加しましょう。

setWindowFlags(Qt::MSWindowsFixedSizeDialogHint);

次に、mainwindow.uiの"statusBar"の"sizeGripEnabled"のチェックを外します。(もしくはstatusBarを削除してもOK!)
sizeGripEnabled.png

結果


修正後.png

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?