i tried all the things suggested here and nothing worked. addwitnessaddress command doesnt exist in bitcoin-qt, the electrum script in the other thread just returns p2pkh: prefix to the same private key, and bitcoin-qt does not recognize either p2wpkh: or p2pkh:
maybe it just wont work until a future version of bitcoin-qt