Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, March 2002
QListView problem continued


Message 1 in thread

hi 

this is really bugging me . i read that manuals and it says qApp is a global 
pointer to the QApplication that starts the exec (the event loop)

i used qt3 designer to make a dialog boxed application form.ui.h which creates 
a class form


i am able to run the application perfectly as such but now solving the problem 
of the qlistview if i add qApp->processEvents in my *Form*  functions it says 

qApp is undeclared ... what am i missing now ??? 

i know i am doing some careless mistake somewhere just please point it out :0) 
actually i am not sure which ways the  the IDE -> QT Designer works as i can 
not see the widget declaration with in the main. but found in my form class. 
but still qApp seems to be a hinder.

regards
Rohit

__________________________________________________________________
#include <qapplication.h>
#include ".ui/form.h"


int main( int argc, char ** argv )
{
    QApplication a( argc, argv );

Form *w = new Form;
    w->show();

    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    return a.exec();
}
__________________________________________________________________

void Form::startFilling()
{

QWidget * widget = new QWidget(ListView);
ListView->viewport()->setUpdatesEnabled(TRUE);

for(int i=1;i<4500;i++)
{
new QListViewItem( ListView, "rohit" );
//qa->processEvents();                                      ////// ERROR 

}    

}

____________________________________________________________________


-- 
 [ signature omitted ] 

Message 2 in thread

Do you have this:

#include <qapplication.h>

in the file where you have the qApp->processEvents() ?

> -----Original Message-----
> From: owner-qt-interest@trolltech.com 
> [mailto:owner-qt-interest@trolltech.com] On Behalf Of Rohit
> Sent: Thursday, March 07, 2002 7:57 PM
> To: qt-interest@trolltech.com
> Subject: QListView problem continued
> 
> 
> hi 
> 
> this is really bugging me . i read that manuals and it says 
> qApp is a global 
> pointer to the QApplication that starts the exec (the event loop)
> 
> i used qt3 designer to make a dialog boxed application 
> form.ui.h which creates 
> a class form
> 
> 
> i am able to run the application perfectly as such but now 
> solving the problem 
> of the qlistview if i add qApp->processEvents in my *Form*  
> functions it says 
> 
> qApp is undeclared ... what am i missing now ??? 
> 
> i know i am doing some careless mistake somewhere just please 
> point it out :0) 
> actually i am not sure which ways the  IDE -> QT Designer 
> works as i can 
> not see the widget declaration with in the main. but found in 
> my form class. 
> but still qApp seems to be a hinder.
> 
> regards
> Rohit
> 
> __________________________________________________________________
> #include <qapplication.h>
> #include ".ui/form.h"
> 
> 
> int main( int argc, char ** argv )
> {
>     QApplication a( argc, argv );
> 
> Form *w = new Form;
>     w->show();
> 
>     a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
>     return a.exec();
> } __________________________________________________________________
> 
> void Form::startFilling()
> {
> 
> QWidget * widget = new QWidget(ListView);
> ListView->viewport()->setUpdatesEnabled(TRUE);
> 
> for(int i=1;i<4500;i++)
> {
> new QListViewItem( ListView, "rohit" );
> //qa->processEvents();                                      
> ////// ERROR 
> 
> }    
> 
> }
> 
> ____________________________________________________________________
> 
> 
> -- 
> Ignore previous fortune.
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> List archive and information: http://qt-interest.trolltech.com
> 


Message 3 in thread

aaaaaaaahhhhhhhhhh!!!! ;)

thanx a lot everythting is working fine for now ...

cheers
Rohit


On Friday 08 March 2002 09:48 am, Sean Murphy wrote:
> Do you have this:
>
> #include <qapplication.h>
>
> in the file where you have the qApp->processEvents() ?


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Message 4 in thread

Am Freitag, 8. März 2002 01:56 schrieb Rohit:
>
> __________________________________________________________________
> #include <qapplication.h>
> #include ".ui/form.h"
>
>
> int main( int argc, char ** argv )
> {
>     QApplication a( argc, argv );
>
> Form *w = new Form;
>     w->show();
>
>     a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
>     return a.exec();
> }
> __________________________________________________________________
>
> void Form::startFilling()
> {
>
> QWidget * widget = new QWidget(ListView);
> ListView->viewport()->setUpdatesEnabled(TRUE);
>
> for(int i=1;i<4500;i++)
> {
> new QListViewItem( ListView, "rohit" );
> //qa->processEvents();                                      ////// ERROR

what the heck is qa?????? As I wrote as and as it is stated in the documents, 
the variable is named qApp and not qa ! If this was just a typo in your mail, 
have you included qapplication.h in the file where you call processEvents()?

regards,
P.J.

-- 
 [ signature omitted ]