Results 1 to 4 of 4

Thread: QProgressDialog cancel signal is emitted always

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    165
    Thanked 2 Times in 2 Posts

    Default Re: QProgressDialog cancel signal is emitted always

    Quote Originally Posted by Santosh Reddy View Post
    What is SAFEDELETE?

    Anyway deleting the sending object in a slot is not safe, so instead use deleteLater()
    Qt Code:
    1. progressBarCarregaAtivos->deleteLater();
    To copy to clipboard, switch view to plain text mode 
    Hello Santosh,

    I tried deleteLater, same problem. In fact, first I thought that SAFEDELETE was doing the problem, but after the change I noticed that it could be something else, an than I found the wrong cancel signal being emitted.

    Qt Code:
    1. #define SAFEDELETE(_P) if(_P) {delete _P; _P = NULL;}
    To copy to clipboard, switch view to plain text mode 

    d_stranz, OK I'll see about it, but as I tried to say, no way I call cancel() for the QProgressDialog at least not if Ctrl+Shift+F is working properly!

    Edit: noticed that "progressBarCarregaAtivos->close();" in the second code part I show? Well, I discovered that if I comment that close(), the signal cancel() is not wrongly emitted. And I also discovered that it's not necessary to call that close() because the QProgressDialog is closed even without any call to it's close(). I guess it's because of the autoReset/autoClose issue.
    Last edited by Momergil; 31st January 2013 at 02:32.

Similar Threads

  1. Hide/show the Cancel button in a QProgressDialog
    By Vankata in forum Qt Programming
    Replies: 9
    Last Post: 24th February 2011, 20:43
  2. signal emitted when I zoom
    By mastupristi in forum Qwt
    Replies: 1
    Last Post: 8th July 2009, 17:02
  3. Signal emitted more than once?
    By dbrmik in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2009, 12:44
  4. Program crash when a signal is emitted
    By croscato in forum Qt Programming
    Replies: 7
    Last Post: 22nd November 2008, 22:24
  5. How to show QProgressDialog without cancel button
    By rajesh in forum Qt Programming
    Replies: 1
    Last Post: 30th January 2007, 09:53

Tags for this Thread

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.