QuickBooks Online treats Credit Card Account transactions as cash transactions for cash-basis statements.
The word "cash" is not meant literally. It also covers payments by cheque, credit card, barter, etc. Treating credit card charges as cash-basis transactions is the conservative approach that fits the majority of our customers.
However, if you prefer, you can treat your credit card account like Accounts Payable/Trade and Other Payable and not recognize the expenses until you pay the credit card bill. In this method, you enter a bill when you receive your credit card statement, entering transactions as Accounts Payable/Trade and Other Payable, and then use the Pay Bills page when you're ready to make the payment.
You can also pay off your Credit Card account when you receive your statement from the Cheques or Expenses page.
It's important to discuss these approaches with your accountant before deciding on the method that best fits your situation.