首页| 论坛| 消息

回复: 【问答】如何去掉窗体边框
#6 [worthing 09-07 16:59]
因为我用的是QTE2.3.7
#7 [XChinux 09-09 00:47]
我在qt-interest里面问一下,一位朋友给出了下面的解答方案:
XChinux wrote:
>> Gael Martin 写道:
>>
>
>>>>XChinux wrote:
>>>>
>>>>
>>
>>>>>>but in qt 2.3.7, the function "setWindowFlags()" had not exist,
>>>>>>how can I get the same style of Qt4's splash window style?
>>
>>>>
>>>>
>>>>Cant you just upgrade to QT 4.0.1? Now that it's GPL on all platform
>>>>there's no excuses...
>>>>
>>>>Gael
>
>>
>> in qtcn.org(http://www.qtcn.org, Chinese Qt Forum),a qter asked
>> this question. and he said he used only 2.3.7(commercial edition),so can
>> not upgrade to Qt 4.0.1。

A previous work of mine is based on Qt 2.3.x (didn't know there existed
a 2.3.7 release?) - it uses a splashscreen which does more or less what
the QSplashScreen does today. It's based on some older article which
appeared in the Qt Quarterly (you might find it on TrollTech's webpage).
Source code here: http://www.pointshop3d.com - the class is called
SplashScreen (POINTSHOP/src/Utilities/UserMessages/src/SplashScreen.h)
The trick is something like this:
// Qt 2.x
splash = new QLabel (0, "splash", Qt::WDestructiveClose |
Qt::WStyle_Customize | Qt::WStyle_NoBorder);
splash->setLineWidth(0);
splash->setMidLineWidth(0);
I have attached the relevant source code for convenience. You need to
hardcode a nice *.png path for use as splash image and it has a single
dependency on a "Version" class which provides - a version number;)
Should be easy to adjust to your needs.
Cheers, Oliver


//
// Title: SplashScreen.cpp
// Created: Mon Sep 23 14:13:25 2002
// Authors: Oliver Knoll, Mark Pauly, Matthias Zwicker
//
// Copyright (c) 2001, 2002, Computer Graphics Lab, ETH Zurich
//
// This file is part of t ..
#8 [worthing 09-09 09:30]
谢谢版主,我试试。我真菜,英文不行,在qt-interest和qtforum.org中都不好意思发言。
#9 [running 09-09 16:54]
qt-interest的网址多少啊?谢谢了!!!
#10 [XChinux 09-09 17:04]
qt-interest是新闻组
nntp://nntp.trolltech.com

<< 1 2 >> (2/2)

回复 发表
主题 版块