Greetings,
I have written a application using qt. I was able to compile without any errors. But now when I compile (this is successfull) and run (this is the problem) the pogram it gives the following error.
QPaintDevice: Must construct a QApplication before a QPaintDevice Segmentation fault
Google replied saying that there shouldnt be a static function. I do not know how to ask uic not to create static functions in my dialog_box.cpp. This is the only place where there are static functions. But there is no static work in Makefile or dialog_box.ui.
Thanks in advance.
Bye.
On Saturday 12 Jul 2003 2:20 am, Amish K. Munshi wrote:
run (this is the problem) the pogram it gives the following error.
QPaintDevice: Must construct a QApplication before a QPaintDevice Segmentation fault
Are you sure this is not the problem? Do you create an instance of QApplication in your main function for example. You need to have one for majority of Qt apps, take a look at main.cpp files of any of the example program. Dont know about the static stuff you mentioned, pass a minimal code you think should work that is not working, and may be people can suggest more.
qt-interest@trolltech.com is a good mailing list you should be in if you are trying to learn Qt, its highly responsive, and you may get the feel of the common coding patterns and practices when using Qt, by the discussions over there.
On Sat, Jul 12, 2003 at 03:41:28AM +0530, Amit Upadhyay wrote:
GLUG Meeting on 13th July, 4pm at KReSIT, IIT Campus, Powai.
Content-Description: signed data
On Saturday 12 Jul 2003 2:20 am, Amish K. Munshi wrote:
run (this is the problem) the pogram it gives the following error.
QPaintDevice: Must construct a QApplication before a QPaintDevice Segmentation fault
Are you sure this is not the problem? Do you create an instance of QApplication in your main function for example. You need to have one for majority of Qt apps, take a look at main.cpp files of any of the example program. Dont know about the static stuff you mentioned, pass a minimal code you think should work that is not working, and may be people can suggest more.
Yes I have a QApplication a(argc,argv) in my app. It was compiling flawlessly. I made some changes in the chat_window.ui.h and then compiled it again and it gave this error. I ran out of disk space while compiling (realised that about after 30 minutes of struggle.) So I freed some space by removing php-manual. And comiled it again but this error stay. Also tried make clean and then a make again. Visit http://www.geocities.com/amishmunshi/source.tar.gz Do not expect the code to do anything significant. It is still under development. Please make and ./vchat it (do a qmake -project -o vchat.pro and a qmake if required).
qt-interest@trolltech.com is a good mailing list you should be in if you are trying to learn Qt, its highly responsive, and you may get the feel of the common coding patterns and practices when using Qt, by the discussions over there.
I did like this list, but they are very active to my liking. I guess 100 mails per day. All that happens is that I end up deleting all the mails without reading.
-- Amit Upadhyay Senior Undergraduate Student Department of Mechanical Engg. Indian Institute of Technology Bombay Mumbai-76, India Phone: (91) 9820325940
On Sat, Jul 12, 2003 at 02:20:58AM +0530, Amish K. Munshi wrote:
GLUG Meeting on 13th July, 4pm at KReSIT, IIT Campus, Powai.
Greetings,
I have written a application using qt. I was able to compile without any errors. But now when I compile (this is successfull) and run (this is the problem) the pogram it gives the following error.
QPaintDevice: Must construct a QApplication before a QPaintDevice Segmentation fault
Google replied saying that there shouldnt be a static function. I do not know how to ask uic not to create static functions in my dialog_box.cpp. This is the only place where there are static functions. But there is no static work in Makefile or dialog_box.ui.
Thanks in advance.
This problem is solved, The problem is that I was using a
chat_window c_win[10]; as a global variable. It was assigning this memory before before QApplication could run. The solution I have used is
chat_window *c_win[10]; ^^^^^
And a dynamic allocation when it is required.
I guess all that was required a good night sleep to get this working. :-)
Thanks for the help.
Bye.