You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Marco

Unregistered

1

Friday, May 7th 2004, 3:19pm

Inserting new objects in a window

Hi all!

I have a trouble with QT 3.2.0. I have created a MainWindow with some controls. If I load the .pro file in VC++ .NET, everything works fine. However, If I try to add an object to the windows, using the QT Designer, and then rebuild the project insine VC++ .NET, I get an error at the following lines in the .cpp that is automatically created by reading the ui file:

if ( !name )
setName( "frmMain" );

But a strange thing happens: if I delete another object from the Window, the program works again. It seems that there is a limitation to the number of object that I can put in a Window.

Can anyone help me?
Thanks.
Marco

axeljaeger

Professional

  • "axeljaeger" is male

Posts: 730

Location: Frankfurt Germany

Occupation: Student

  • Send private message

2

Friday, May 7th 2004, 4:12pm

Could you please post the exact error message from your compiler?
It's nice to be important but it's more important to be nice

Marco

Unregistered

3

Friday, May 7th 2004, 4:43pm

Here is the error message:

First-chance exception at 0xffffffff in Editor.exe: 0xC0000005: Access violation reading location 0xffffffff.
Unhandled exception at 0xffffffff in Editor.exe: 0xC0000005: Access violation reading location 0xffffffff.

Thanks very much!
Marco

axeljaeger

Professional

  • "axeljaeger" is male

Posts: 730

Location: Frankfurt Germany

Occupation: Student

  • Send private message

4

Friday, May 7th 2004, 5:26pm

I never used the MS VC++ .net compiler but it looks like that you need to recompile your project because of some corrupted object files.
It's nice to be important but it's more important to be nice

Marco

Unregistered

5

Friday, May 7th 2004, 7:46pm

I've tried to delete all the intermediate files, also to recreate per VC++ .NET project from the .pro file, but the problem still appears.

Please, help me!
Marco

axeljaeger

Professional

  • "axeljaeger" is male

Posts: 730

Location: Frankfurt Germany

Occupation: Student

  • Send private message

6

Friday, May 7th 2004, 8:32pm

Could you post the UI-File here? How many controlls are there? Have you tried it on another PC? I ask you because you could think about separating the problem in a small application, write a nice description and send it to trolltech. But we should be shure that this is a bug before bothering them.
It's nice to be important but it's more important to be nice

Marco

Unregistered

7

Friday, May 7th 2004, 10:31pm

Hi!

You can retrieve the UI file from here: http://www.marcominerva.com/test/frmMain.ui

I have tried this code in two different computers, but the problem is the same.

Regards, Marco

axeljaeger

Professional

  • "axeljaeger" is male

Posts: 730

Location: Frankfurt Germany

Occupation: Student

  • Send private message

8

Saturday, May 8th 2004, 9:25am

OK, I'll try it on my linux box and try to add some components to the form.
It's nice to be important but it's more important to be nice

Cyrik

Unregistered

9

Sunday, November 21st 2004, 9:07pm

Well I had the same problem.

I solve it adding a breakpoint on the line :
QApplication app( argc, argv );

The release version works.

Don't ask me why it works ... I think it's a problem in the debug mode of MVC++.

I hope this trick will work on your computer.