Results 1 to 20 of 41

Thread: closing a dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    31
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: closing a dialog

    Think I've worked it out
    I want the plasmoid to display a seperate dialog and QWebView when requested.
    I dont want the QWebView to be always loaded but hidden

    So currently it does the following, From my understadning

    1. when the plasmoid starts it creates the constructor which just creates the dialog
    2. when i select the item to show the dialog I use showEvent to create a QWebView and display the page.
    3. When I close the dialog I use closeEvent to delete the QWebView

    What can I use as profiling software?

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: closing a dialog

    Why on earth do you want to create the webView in the showEvent and destroy it when it gets closed? Just do it like anyone else: Create it in the constructor let it Qt destroy when necessary. Dont try to be too clever, keep it simple stupid, trust Qt.

    You can use either valgrind or oprofile for profiling. But if there is already need for profiling, then your computer has a problem.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Closing a dialog using a button
    By srohit24 in forum Qt Programming
    Replies: 5
    Last Post: 21st July 2009, 05:57
  2. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  3. Dialog is not closing
    By manmohan in forum Newbie
    Replies: 5
    Last Post: 1st December 2008, 17:04
  4. Replies: 9
    Last Post: 13th August 2008, 18:07
  5. closing dialog in hidden main Widget
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2006, 10:35

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.