PDA

View Full Version : Shape-Changing Dialogs



edukasi
4th April 2014, 05:59
Hallo All...

I have a problem with my program. I want to make program Shape-Changing Dialogs like on the Jasmin Blanchette book's. This is my screenshoot program

10250

and this my source program
10252
10253
10254
10255

What can i do for correct my program ?
Whereas i just writed like that's book.

Thank You.

ChrisW67
4th April 2014, 06:27
Your UI file defines a UI that will result in a class that will be named "Ui::Dialog" not "Ui::sortDialog". That's the source of the compile error you showed us.

Your UI is missing a top level layout
The line 1 and 13 of sortdialog.cpp are typos.
The UI does not define widgets called secondaryGroupBox, tertiaryGroupBox, primaryColumnCombo, secondaryColumnCombo, or tertiaryColumnCombo. You attempt to access these in sortdialog.cpp.

edukasi
4th April 2014, 08:31
I don't understand your mean.

I was tried rename class on file "sortDialog.ui" from <class>Dialog</class> to <class>sortDialog</class>
But this rename make increase error.

Can you send examples for me?
I hope you can help me.

ChrisW67
4th April 2014, 23:41
Open the UI file in Designer and look at the name of the top object in the object tree. You will notice its name is "Dialog"... You should change it to "sortDialog." You will also notice that that object has a No Layout icon meaning your dialog has no top level layout. You apply a top level layout using the tool buttons on the main tool bar.
http://qt-project.org/doc/qt-5.1/qtdesigner/designer-layouts.html

This is also where you give the widgets on your form names that you can refer to in your code.

Radek
5th April 2014, 10:48
The name which will appear in the ui_*.h file is the object name given to the object in the Designer by you. Therefore open the sortDialog.ui file and check (and remember) object names given to your objects. You will need them later in your code. The object name of the main dialog window is not sortDialog but Dialog. The compiler searched Ui::sortDialog and failed.