Results 1 to 10 of 10

Thread: menu problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    sigh, I created by myself main.cpp, pro-file, but where is ui-file?
    update you example if you wanna help from us.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    I wonder how do you manage to compile your application without these includes
    Qt Code:
    1. #include <QAction>
    2. #include <QMenu>
    3. #include <QMenuBar>
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    this code leads to crash
    Qt Code:
    1. ...
    2. menu();
    3. action();
    4. ...
    To copy to clipboard, switch view to plain text mode 
    must be
    Qt Code:
    1. ...
    2. action();
    3. menu();
    4. ...
    To copy to clipboard, switch view to plain text mode 
    after that, your app works fine.
    even without ui-file.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    May 2009
    Posts
    129

    Default Re: menu problem

    Hi

    Still I am not getting . Here i have attached my whole code.
    Attached Files Attached Files

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    crash again right here
    Qt Code:
    1. contact->addAction(yuvi);
    To copy to clipboard, switch view to plain text mode 
    don't see where you create yuvi.
    PS. it's better to pack your project and then post the archive.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. #6
    Join Date
    May 2009
    Posts
    129

    Default Re: menu problem

    Hi

    I am, facing same problem for my modified code...

    Sorry i don't have the zip format compression tool. I have rar type tool.

    Here i have posted my complete code
    Attached Files Attached Files

  7. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    come on! did you run you app before posting it?!!!
    it still crashes!!!
    if you want help from us PLEASE check you code, run it.
    why should I fix your crashes?!!
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: menu problem

    come on! did you run you app before posting it?!!!
    it still crashes!!!
    if you want help from us PLEASE check you code, run it.
    why should I fix your crashes?!!
    PS. @moderator, please delete this post, I made a mistake and posted it twice.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #9
    Join Date
    Nov 2007
    Posts
    31
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: menu problem

    You forgot to make "Call" Action, this causes crash.

    Other things.
    phonecall() is not defined yet.
    and you should call setupUi() in the constractor.

    Qt Code:
    1. ui->setupUi(this);
    2. createactions();
    3. createmenus();
    To copy to clipboard, switch view to plain text mode 
    kichi

Similar Threads

  1. QMenu Multiple selection problem
    By vajindarladdad in forum Newbie
    Replies: 3
    Last Post: 7th August 2009, 13:32
  2. Replies: 19
    Last Post: 3rd April 2009, 23:17
  3. addMenu problem on Mac
    By yycking in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2009, 07:18
  4. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  5. Menu problem using Designer
    By JimBrown in forum Qt Tools
    Replies: 1
    Last Post: 19th February 2007, 21:47

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
  •  
Qt is a trademark of The Qt Company.