Results 1 to 2 of 2

Thread: QFileDialog in Qt designer

  1. #1
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QFileDialog in Qt designer

    I was working with Qt designer and I wanted to be able to add a QFileDialog from within it.

    Since I didn't see the QFileDialog as one of the items in the widget box, I tried the following to see if I could get it to work:

    1) added a QLineEdit where the QFileDialog should be
    2) promoted it and entered the following:
    cusomclassname = QFileDialog
    header file = qfiledialog.h
    3) saved the ui file.

    When I did this and compiled the program, it worked with no errors, however there is nothing showing where the QFileDialog should be, not even a QLineEdit.

    What is the correct method I should use to have access to other widgets that are not in the designer by default? Also is there a way I can add QFileDialog to the widget box so I can drag and drop it like the other included widgets?

  2. #2
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog in Qt designer

    Actually I think I understand why It's now working. for some reason I thought that the QFileDialog included the line edit and button to press to activate it together, but in fact it is a seperate dialog that I can get the results from and place in the line edit. So in fact I do not need a custom widget for it afterall, and that is why it wouldnt show up in my program when I compiled it. =)

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.