简体   繁体   English

您将如何使用C ++ / Qt5构建无窗口应用程序?

[英]How would you build a windowless application with C++/Qt5?

How would you build a windowless application with C++/Qt5? 您将如何使用C ++ / Qt5构建无窗口应用程序? Do I have to use QDialog or QWidget? 我必须使用QDialog或QWidget吗?

For example, Launchy has no window border and the background around the text box is transparent. 例如, Launchy没有窗口边框,文本框周围的背景是透明的。

I think that's what you're looking for : 我认为这就是您要寻找的:

http://qt-project.org/doc/qt-4.8/widgets-shapedclock.html http://qt-project.org/doc/qt-4.8/widgets-shapedclock.html

This is a tutorial on how to make a shaped and borderless window with Qt. 这是一个有关如何使用Qt制作形状和无边界窗口的教程。

It's for Qt4.8 though, i think it should work on Qt5. 虽然它适用于Qt4.8,但我认为它应该适用于Qt5。

EDIT : Found the Qt5.0 version : http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-shapedclock.html 编辑:找到了Qt5.0版本: http ://qt-project.org/doc/qt-5.0/qtwidgets/widgets-shapedclock.html

Use a QWidget with Qt::SplashScreen or Qt::FramelessWindowHint . 将QWidget与Qt::SplashScreenQt::FramelessWindowHint Check all the other window flags . 检查所有其他窗口标志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM