Results 1 to 5 of 5

Thread: Shape-Changing Dialogs

  1. #1
    Join Date
    Mar 2014
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Shape-Changing Dialogs

    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

    Screenshot-1.jpg

    and this my source program
    sortdialog.h
    sortdialog.cpp
    sortDialog.ui
    main.cpp

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

    Thank You.
    Last edited by edukasi; 4th April 2014 at 06:03.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Shape-Changing Dialogs

    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.

  3. #3
    Join Date
    Mar 2014
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shape-Changing Dialogs

    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.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Shape-Changing Dialogs

    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/qtd...r-layouts.html

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

  5. #5
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shape-Changing Dialogs

    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.

Similar Threads

  1. Shape-Changing Dialog
    By gtnoob in forum Newbie
    Replies: 4
    Last Post: 11th November 2012, 10:20
  2. Changing cursor shape
    By Odyseusz in forum Qt Programming
    Replies: 7
    Last Post: 22nd November 2011, 17:39
  3. Shape-resizing dialogs doesn't work...
    By nina1983 in forum Qt Programming
    Replies: 4
    Last Post: 1st October 2008, 09:27
  4. Shape changing under other tab using slider/spinbox
    By kramed in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2007, 20:59
  5. Shape-changing dialog with qt4.1
    By moe in forum Qt Tools
    Replies: 3
    Last Post: 2nd February 2006, 11:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.