Results 1 to 5 of 5

Thread: no compile error, but error on run with QMenu QAction

  1. #1
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default no compile error, but error on run with QMenu QAction

    This is another no compile error problem... I am trying to execute the following lines...
    Qt Code:
    1. resizeRawMenu = rawMenu->addMenu(tr("&Resize"));
    2. resizeRawMenu->addAction(resize_25_RawAct);
    To copy to clipboard, switch view to plain text mode 
    resizeRawMenu is declared as a QMenu

    rawMenu is is declared as a QMenu

    and resize_25_RawAct is initialized as
    Qt Code:
    1. resize_25_RawAct = new QAction(tr("Resize 25"), this);
    To copy to clipboard, switch view to plain text mode 

    These are the only things I can get from gdb.
    Program received signal SIGSEGV, Segmentation fault.
    0x00bedb9f in ZN4QCss10StyleSheetC1Ev ()
    (gdb) backtrace
    #0 0x00bedb9f in ZN4QCss10StyleSheetC1Ev ()
    #1 0x0054bac0 in ZN7QWidget12insertActionEP7QActionS1_ ()
    #2 0x0054bc8e in ZN7QWidget9addActionEP7QAction ()
    #3 0x004090ad in ?? ()
    #4 0x016e78e8 in ?? ()
    #5 0x7c91056d in ntdll!RtlFreeThreadActivationContextStack () from C:\WINDOWS\system32\ntdll.dll
    #6 0x00470426 in Z33qt_plugin_instance_pnp_basictoolsv ()
    #7 0x0040d12a in ?? ()
    #8 0x0022f9b0 in ?? ()
    #9 0x0022f9b0 in ?? ()
    #10 0x0022f900 in ?? ()
    #11 0x10171d61 in ZN26QTextCodecFactoryInterfaceD1Ev () from C:\Qt\4.3.1\bin\QtCore4.dll
    #12 0x004031d6 in ?? ()
    #13 0x0022f9b0 in ?? ()
    #14 0x0022fe30 in ?? ()
    #15 0x003d4ca0 in ?? ()
    #16 0x00040301 in ?? ()
    #17 0x7c96d8a8 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
    #18 0xffffffff in ?? ()
    #19 0x7c96d886 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
    #20 0x7c949d18 in ntdll!RtlInsertElementGenericTableAvl () from C:\WINDOWS\system32\ntdll.dll
    #21 0x003d0000 in ?? ()
    #22 0x50000161 in ?? ()
    #23 0x7c91b686 in wcsncat () from C:\WINDOWS\system32\ntdll.dll
    #24 0x00000000 in ?? ()
    Image Analysis Development Framework Using Qt (IADFUQ)

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no compile error, but error on run with QMenu QAction

    Do you create resize_25_RawAct before or after adding it to the menu?

  3. #3
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no compile error, but error on run with QMenu QAction

    I initialize it before
    Image Analysis Development Framework Using Qt (IADFUQ)

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: no compile error, but error on run with QMenu QAction

    The backtrace could be more helpful if the application was compiled in debug mode.
    J-P Nurmi

  5. #5
    Join Date
    May 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: no compile error, but error on run with QMenu QAction

    I 've the same Issue with Qt 4.7.2 that calling exec function of the menu terminates the application. I'm also using style sheets.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.