You are not logged in.

1

Wednesday, July 20th 2005, 11:03am

Resizing Problem

Hi,
I want to resize a main windows and here are my result :

static GLObjectWindow* w; // Window of my application

DONT WORKS !!!
w->setFixedSize(531, 663);

DONT WORKS !!!
setSizeIncrement(1.25,1);

WORKS --> COOL
w->setMaximumSize( 531, 663 );

DONT WORKS --> I can reduce the window the size that I want !!!
w->setMinimumSize(531, 663);

// here's my function to resize, the prob is that when I do the resize( newSize ), it's
// logical that itrecall the function resizeEvent, that make a loop.

void GLTexobj::resizeEvent ( QResizeEvent *e){
if (Resizable) {
QSize newSize = e->size();
newSize.setHeight((e->size()).height());
newSize.setWidth((e->size()).height()/1.25);
w->resize( newSize );
}
}

Thanks for your help ?(

2

Wednesday, July 20th 2005, 11:22am

RE: Resizing Problem

Why did you make w static?
Can you make it to work without the static keyword?

3

Thursday, July 21st 2005, 9:09am

RE: Resizing Problem

Yes, it's possible, bu that don't solve my problem.

My problem is when I do :
w->setMinimumSize( 531, 663 );
w->setMaximumSize( 531, 663 );
// = w->setFixedSize(531, 663);

The minimum size of the window works and when I try to resize my windows, it don't work, perfect.
But after activated some widget for exemple pushbutton, I can resize my windows !! The minimum size of my windows is not set, but the maximum is ???!!! ?(
Have you an idea ?

zlatko

Professional

  • "zlatko" is male

Posts: 728

Location: Ukraine,Lviv

Occupation: programmer

  • Send private message

4

Thursday, July 21st 2005, 11:22am

1) what are you mean dont work perfect?
2) what are you mean after activated? after pressed?
3) use code tags
a life without programming its alike empty bottle 8)

5

Friday, July 22nd 2005, 1:09am

Reply

Hi, thanks for you interst.

It don't work , perfect !!!
But that's wasn't very easy to understand, sorry ;(

I mean that I can't resize my windows, when I try with my mouse, the main window don't let me do it. It's because I've set the minimum size egal to the maximum.

w->setMinimumSize( 531, 663 );
w->setMaximumSize( 531, 663 );


By this way, I've no problem, all works perfectly.

---------------------------------------------------------------------------------

Secondly, when I click to a pushbutton who is connected to this slot :

void GLObjectWindow::SlotNvlPartie()
{
...
picAcceuil->hide(); // I've juste identified that when comment this line all work !!!
...
}


I can set the minimum size that I want with my mouse even if the minimum size is style set !!!


Here is the declaration of picAcceuil :

picAcceuil = new QLabel( this, "picAcceuil" );
picAcceuil->setEnabled( TRUE );
picAcceuil->setGeometry( QRect( 30, 50, 470, 420 ) );
picAcceuil->setPaletteForegroundColor( QColor( 212, 208, 200 ) );
picAcceuil->setFrameShape( QLabel::NoFrame );
picAcceuil->setFrameShadow( QLabel::Plain );
picAcceuil->setPixmap( (const char **)image1 );
picAcceuil->setScaledContents( TRUE );



I don't know why when I hide my image the minimum size value change ?
I don't know how to declare it to make it works ?

I hope that I've been easy to understand a this time !
Thanks

This post has been edited 1 times, last edit by "teufboy" (Jul 22nd 2005, 1:14am)


6

Friday, July 22nd 2005, 1:12am

Sorry prob with my so slow 56ko connection...

...

This post has been edited 1 times, last edit by "teufboy" (Jul 22nd 2005, 1:13am)