Results 1 to 4 of 4

Thread: to add a dialog

  1. #1
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default to add a dialog

    I have an application, to that i have to add about in help. I designed different form say form2 and the original application is say form1.

    void form1::helpAboutActivated()
    {

    }

    I have this in my form1.ui.h file---- what code i have to add above so that i can avtivate that dialog form2.

    I tried
    void form1::helpAboutActivated()
    {
    form2 f2;
    f2.exec();
    }


    but at the compilation time it is stating an error that form2 is not declared under scope...


    Please tell me what to do

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: to add a dialog

    Did you include a proper file defining form2?

  3. #3
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: to add a dialog

    to where i have to include...

    i was having my application opened in qt designer. I selected the new dialog using File->new

    then i added what i wanted to that new form form2. now i want to open that form2 from an event occured in form1

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: to add a dialog

    Include it in the file where you reference "form2".

Similar Threads

  1. Replies: 1
    Last Post: 1st February 2007, 17:07
  2. [itemview] delegation to a dialog ...
    By lauranger in forum Qt Programming
    Replies: 6
    Last Post: 27th November 2006, 10:08
  3. Replies: 3
    Last Post: 23rd July 2006, 18:02
  4. Show/hide part of dialog with resizing.
    By Spockmeat in forum Qt Tools
    Replies: 6
    Last Post: 7th June 2006, 08:22
  5. Dialog positioning in GNOME
    By simk in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2006, 09:41

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.