DHANA
DHANA

Reputation: 11

How to switch between two .ui forms in Qt Creator?

I am using QtCreator and I need to create a program which when clicking a button in one (.ui) frame, changes focus to another (.ui) frame. How can I do that?

Upvotes: 0

Views: 2400

Answers (2)

qwertyman
qwertyman

Reputation: 1

Have a look at the activateWindow method of QWidget. Link

I hope this helps other people coming here by google.

Upvotes: 0

Caleb Huitt - cjhuitt
Caleb Huitt - cjhuitt

Reputation: 14941

I suggest putting your two forms into different pages of a QStackedWidget, and setting the active widget based on which of the two you want to have visible.

Upvotes: 1

Related Questions