Results 1 to 20 of 29

Thread: Passing Pixmaps between MainWindow and Dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    32
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Passing Pixmaps between MainWindow and Dialog

    Hello again, Thanks for replying..
    Ok I'll try that..

    Anyways, my previous hunch was right, the QImage image object gets destroyed after the MainWindow:pen() function. In the showBrightnessDialog(), I tried to put another
    QImage image(fileName); and it proceeded and displayed the pixmap inside the label as planned.

    Just to need know why? Any ideas?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Passing Pixmaps between MainWindow and Dialog

    If the image object was going out of scope, you wouldn't be able to compile the application. It's not a heap based object, it can't be deleted "somewhere in the meantime". The image might be null, but that by itself wouldn't cause your application to crash unless you tried to iterate its pixels or something.

Similar Threads

  1. Communication between MainWindow and a dialog
    By Backslash in forum Newbie
    Replies: 9
    Last Post: 3rd August 2007, 04:27
  2. Replies: 2
    Last Post: 23rd May 2007, 03:51
  3. Opening a Dialog from a MainWindow FileMenu
    By nbkhwjm in forum Newbie
    Replies: 4
    Last Post: 17th April 2007, 12:24
  4. Replies: 3
    Last Post: 23rd July 2006, 18:02

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.