[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Application resize does not work
From:       Raffaele Sandrini <maturarbeit () gmx ! ch>
Date:       2002-11-29 15:30:37
[Download RAW message or body]

This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.

Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.


> Only if you have to do something specific with your content on resize. 
> The standard implementation is usually good enough. 
>  
> Are you returning to the event loop after you called resize? 
> Or perhaps minimumSize or maximumSize are set to the same size. 
 
I tried both. The eventr solution included. It does still not work. I have 
no idea what i'm doing wrong. I'm attaching the mentioned source file. 
Could someone please check whats the error there ... 
 
Thanks in advance. 
 
cheers, 
Raffaele 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
["kwglogin.cpp" (text/x-c++src)]

/*
 * kwglogin.cpp
 *
 * Copyright (C) 2001 Raffaele Sandrini <rasa@gmx.ch>
 */

// ALL THE UNNECESSARY PARTS WERE DELETED


#include <kglobal.h>
#include <klocale.h>
#include <kconfig.h>
#include <kpushbutton.h>
#include <kmessagebox.h>
#include <kuniqueapplication.h>
#include <kguiitem.h>
#include <dcopclient.h>

#include <qlayout.h>
#include <qlabel.h>
#include <qframe.h>
#include <qsizepolicy.h>
#include <qfile.h>
#include <qstring.h>
#include <qcstring.h>
#include <qdesktopwidget.h>
#include <qcursor.h>
#include <qevent.h>

#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

#include "kwglogin.h"
#include "kwgloginhelpview.h"

#include <netwm.h>

#define KWGLOGIN_CFG_PATH "/home/autologin/.kwglogin"
#define HOMEDRIVE "/home/autologin/Heimverzeichnis"
#define ICACLIENT "/usr/lib/ICAClient/wfica"

KWGLogin::KWGLogin(): KMainWindow( 0, "KWGLogin" )
{
    // set probrieties
    setAcceptDrops(false);

	NETWinInfo inf( qt_xdisplay(), winId(), qt_xrootwin(),NET::XAWMState | NET::WMWindowType );
	inf.setWindowType(NET::Override);
	inf.setState(NET::SkipTaskbar,0);

	// Set up the window
	QVBoxLayout *layout = new QVBoxLayout(this);
	layout->setMargin(10);

	// Here are all the UI function including the layout

	resize(0,0);	// To size it maximaly down
	//resize(minimumSizeHint());

	QDesktopWidget *desktop = KApplication::desktop();
	QRect rect = desktop->screenGeometry(desktop->screenNumber(QCursor::pos()));
	move(rect.x() + (rect.width() - width())/2, rect.y() + (rect.height() - height())/2);

	parseConfigFile();

	connect (normal_view,SIGNAL(clicked(const QString&, const QString&)),this,SLOT(slotLogin(const \
QString&, const QString&)));  connect (logged_view,SIGNAL(clicked()),this,SLOT(slotLogout()));
	connect (help,SIGNAL(clicked()),this,SLOT(slotHelp()));
	
	return;
}

KWGLogin::~KWGLogin()
{

}

void KWGLogin::slotLogin(const QString &name, const QString &passwd) {

	// SOME OTHER STUFF

	// THIS FUNCTION IS EXECUTED WHEN A CERTAIN BUTTON WAS PRESSED. IF I DO THIS THE APP DOES \
_NOT_ GET SMALLER. BUT IF I EXECUTE THE RESIZE METHOD VIA DCOP IT RESIZES IN THE SAME STATE.

	resize(0,0); // Make it smaller

	//THE EVENT IMPLEMETATION DID NOT WORK
	//QResizeEvent e(QSize(0,0),size()); // Um es so klein als moeglich zu machen
	//resizeEvent( &e );

	QDesktopWidget *desktop = KApplication::desktop();
	QRect rect = desktop->screenGeometry(desktop->screenNumber(QCursor::pos()));
	move(rect.x() + (rect.width() - frameGeometry().width()), rect.y());

	return;
}

// THE REST OF THE APP


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic