[Qt-interest] 'Back' button not working properly.
Saravana Selvaraj
saravana.selvaraj at altair.com
Thu Apr 9 09:10:45 CEST 2009
Hi Ravi,
{
>> Mediagallery();
}
Here, the above statement creates a new object of type Mediagallery. It
doesn't call its own class constructor.
So, in your case, you need to move the required functionality from
constructor to some other member function and call this new member
function from back2gallery().
Hope this helps.
Regards,
Saravana
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Ravi_Kalepalli
Sent: Thursday, April 09, 2009 11:42 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] 'Back' button not working properly.
Hi everyone,
I am having problems implementing the functionality of a 'Back'
button.I am working on a Media gallery using Qt 4.4.3. When the gallery
is opened,we see the first 10 pictures present in it(The 10
pictures/thumbnails are set on 10 QPushButtons).On clicking any of the
10 pics ,it gets enlarged (set on top of a QLabel). Now, once the
enlarged picture is shown,I am thinking of giving a 'Back'button so
that the user can go back to the initial view showing the 10 thumbnails
on the 10 pushbuttons. I created a button 'back' and connected it to a
slot 'back2gallery()' inside which I called the constructor again. My
constructor's name is 'Mediagallery()'.So, I wrote- void
Mediagallery::back2gallery()
{
Mediagallery();
}
But,it's not working.I was thinking that it was simple...but,guess I did
it wrong. Please advice on how to get past this issue. Thank you. Ravi
DISCLAIMER:
This email (including any attachments) is intended for the sole use of
the intended recipient/s and may contain material that is CONFIDENTIAL
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or
copying or distribution or forwarding of any or all of the contents in
this message is STRICTLY PROHIBITED. If you are not the intended
recipient, please contact the sender by email and delete all copies;
your cooperation in this regard is appreciated.
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list