product_search is static member of class product_record;
Qt Code:
  1. product_record * product_search(int numb);
To copy to clipboard, switch view to plain text mode 

Not in the code you originally posted. And it makes absolutely no sense to make this method static. Create an instance of your product_record class, and call the product_search() method using that pointer.

Qt Code:
  1. product_record * prd = new product_record( this );
  2. prd->product_search( 42 );
To copy to clipboard, switch view to plain text mode 

If you are using the debugger to run and test your code, the stack trace is automatically produced when the code crashes. If you are using Qt Creator as your development IDE, the debug output window will be opened when you build and run in Debug mode.

If you aren't using the debugger, then you need to learn how to use it. You cannot find and fix bugs otherwise.

And pay attention to what the compiler is telling you as you build your program. If it warns about uninitialized variables, then that is something you must fix.