Thanks for you anwser.
I tried what you said, but it's still not working.

Does shadowing mean, that a global variable is hidden because a local variable is used instead?

What exactly happens here?
Qt Code:
  1. delete tableView;
  2. /*QTableView * */ tableView = dmgr->customerTableView();
To copy to clipboard, switch view to plain text mode 

As far as I unterstand, delete tableView does remove the QTableView object created in the QtDesigner-file ui_addressbook.h :

Qt Code:
  1. class Ui_AddressBook
  2. {
  3. public:
  4. QTableView *tableView;
  5. ..
  6. }
To copy to clipboard, switch view to plain text mode 

Then my prepared QTableView returned by dmgr->customerTableView(); is assigned - but assigned to what? There is no other variable named tableView existing, I guess. Do I have to define an additional one with the same name in
AddressBook.h ?

Right now my code is

Qt Code:
  1. delete tableView;
  2. Q_CHECK_PTR(tableView);
  3. Q_CHECK_PTR(dmgr->customerTableView());
  4. tableView = dmgr->customerTableView();
To copy to clipboard, switch view to plain text mode 

Why does die application not quit on "Q_CHECK_PTR(tableView)" after "delete tableView" ?