Results 1 to 3 of 3

Thread: How to launch a dialog?

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default How to launch a dialog?

    I'm using QT 2009.03 with the Visual Studio addin 1.0.2. I'm writing an application that has commands to open non-modal windows, and multiple windows can be open at the same time.

    These windows themselves need to be designed in QTDesigner. An example of what I'm looking for can be found in Firefox. If I go to Tools / Addons it opens a child window.

    Is the correct way to use QT Designer / File / New / Dialog, save it, then drag the resource to the Visual Studio solution under Form Files?

    How would I launch this new dialog from a button press? Do I have to do it in C++? Or is there a way I can do it within QTDesigner? I tried using the Signa/Slot Editor in QT Designer but my the new dialog I made didn't show up as a Receiver

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to launch a dialog?

    Quote Originally Posted by rakkar View Post
    How would I launch this new dialog from a button press? Do I have to do it in C++?
    Yes. You also need to define behavior for your newly designed dialog, so you'll be making a class that uses the generated header file. Non-modal showing of windows can be done using QWidget::show().
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: How to launch a dialog?

    It sounds like I'd also have to send signals from the child window to slots in the main window in C++, and can't do it in QTDesigner.

Similar Threads

  1. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  2. Dialog is not closing
    By manmohan in forum Newbie
    Replies: 5
    Last Post: 1st December 2008, 17:04
  3. Replies: 9
    Last Post: 13th August 2008, 18:07
  4. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 10:41
  5. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48

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
  •  
Qt is a trademark of The Qt Company.