Results 1 to 9 of 9

Thread: Adding new variable into header file breaks my application

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: Adding new variable into header file breaks my application

    Quote Originally Posted by amleto View Post
    show compilable example. What you are posting is very unlikely to be the fault. Your code is probably tripping over some other undefined behaviour.
    Quote Originally Posted by Raadush View Post
    amleto: Yes, what I'm posting is not fault, but as I said there are 4 commented lines in that code and when I uncoment one of them (define one new QMenu or QAction variable) my app stops working. I dont have used them anywhere else in my code except this definition.
    I'll repeat.
    Quote Originally Posted by amleto View Post
    show compilable example.
    Oh yeah, and it's in my sig too.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,334
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    317
    Thanked 871 Times in 858 Posts

    Default Re: Adding new variable into header file breaks my application

    @Raadush: I put on my magic wizard hat, which allows me to see invisible code. My friends high_flyer and amleto don't have a hat like this one, so they are at a disadvantage.

    You have about 300 member variables in your class. Are you initializing every one of them to some known, acceptable value in your constructor - especially those QList<int> * ones? Or are you just hoping that when you use one of them it will magically (like my hat) have a good enough value that Qt can do something with it?

    Are you confusing QList<int> * with QList<int *> and using one when you mean the other? Likewise with the QString * member variables. What's the point of a pointer to a QString?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 2
    Last Post: 13th June 2011, 15:29
  2. adding image to header column of a table view
    By nageshvk in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2011, 04:14
  3. Replies: 10
    Last Post: 6th April 2011, 10:05
  4. Adding a button in the header of a QTreeWidget
    By ioannis in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2008, 18:06
  5. Replies: 2
    Last Post: 3rd April 2007, 19: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.