I have a QDialog that i would like to make non resisable...
how can i do it?
N.A
I have a QDialog that i would like to make non resisable...
how can i do it?
N.A
Qt Code:
To copy to clipboard, switch view to plain text mode
J-P Nurmi
Use either setFixedSize( sizeHint() ), or ( better ) QLayout::setSizeConstraint( QLayout::SetFixedSize ).
The later will allow resizing if system dimensions change ( font sizes, etc ).
But to use it, your layout design must have no errors.
Regards
what is the name of the layout?? i take the gui from qt designer, i have a grid layout.What is it's name?
It does not have a name.
You can access it via the layout() function, as jpn said.
Substitute "dialog" with your variable containing a pointer to the dialog in question. And next time please use the search facilities before asking questions which you suspect may have already been answered.
You can call this from the constructor of your dialog:
Qt Code:
To copy to clipboard, switch view to plain text mode
Sounds like layout() returns 0, which means you haven't installed a top level layout on the dialog. If you're using Designer, deselect all the child widgets, open up context menu over the background of the dialog form, select "Layout->...". In another words, a layout dragged from the widget box is not installed on the dialog but is a "floating layout".
J-P Nurmi
What is the exception?
This most likely is because your layout design is not correct.
Do you have a layout set in your dialog at all?
What about setFixedSize( sizeHint() )?
Could you post some relevant code?
error 400 run time exception. I have done my layout design with qdesigner....how can it be wrong?
which part you want posted?
Qt Code:
{ setupUi(this); heapSort_RadioButton->setChecked(true); sortingOptionsGroupBox->setVisible(false); processButton->setEnabled(false); //sortingOptionsGroupBox->hide(); //settingsGroupBox->hide(); settingsPushButton->setChecked(false); //layout()->setSizeConstraint(QLayout::SetFixedSize); //making the dialog non-resizable by the user createActions(); createMenu(); //lineEditEditedText->setText("Constructor..."); //all connects happen inside the cnstuctor... //connect radio buttons... toggled() connect(measureButton, SIGNAL(clicked()), this, SLOT(doTakeMeasurements())); //connect(processButton, SIGNAL(clicked()), processButton, SLOT(showMenu())); connect(aboutButton, SIGNAL(clicked()), this, SLOT(about())); }To copy to clipboard, switch view to plain text mode
this is y ui file...
If you'd post the UI it would be better.
Also, where do you call layout()->setSizeConstraint?
OK.
You didn't set a top level layout as jpn said. That is why it gave you the exception.
Try the one I attached.
regards
aegis (13th May 2007)
Go ahead and post them...
If not me, I'm sure the guys will be able to answer.
Regards
Bookmarks