Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt:浮动小部件的正确实现_Qt_Widget - Fatal编程技术网

Qt:浮动小部件的正确实现

Qt:浮动小部件的正确实现,qt,widget,Qt,Widget,我从QWidget继承了我的类。基本上没有额外的代码,只需使用编辑器进行更改 我使用它的方式: focusWidget = new FocusWidget(this); //this points to the mainWindow focusWidget->show(); focusWidget->hide(); 现在,小部件在主窗口的左上角显示为这样(由于4k缩放不好,现在看起来很难看)。 我打算主要全屏使用我的应用程序 这个用法正确吗 如何使其成为浮动小部件 如果我想要多个

我从QWidget继承了我的类。基本上没有额外的代码,只需使用编辑器进行更改

我使用它的方式:

focusWidget = new FocusWidget(this); //this points to the mainWindow
focusWidget->show();
focusWidget->hide();
现在,小部件在主窗口的左上角显示为这样(由于4k缩放不好,现在看起来很难看)。 我打算主要全屏使用我的应用程序

这个用法正确吗

如何使其成为浮动小部件

如果我想要多个这样的小部件,我如何控制它们的位置