wenn ich untenstehendes programm ausführe, bin ich schon dicht dran -- allerdings hat der button noch unten und an den seiten eine schmale graue linie, die ich um's ver* nicht wegbekomme!
bin ich da auf einen bug gestossen?
sieht das unter windows auch so aus?
palttform ist linux/x11
folgt der code:
Code: Alles auswählen
#include <qapplication.h>
#include <qmainwindow.h>
#include <qworkspace.h>
#include <qpushbutton.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QMainWindow main;
QWorkspace qws;
main.setCentralWidget(&qws);
QPushButton *qpb=new QPushButton("ein knopf");
qpb->resize(200, 150);
qpb->move(100, 100);
QWidget *pW=qws.addWindow(qpb, Qt::WindowSystemMenuHint);
pW->setAttribute(Qt::WA_NoBackground);
pW->setWindowFlags(pW->windowFlags() & ~Qt::WindowTitleHint);
pW->setBackgroundRole(QPalette::NoRole);
main.show();
return app.exec();
}