You are not logged in.

1

Monday, December 27th 2004, 7:33am

Is it possible to know what the widget contain?

Now I have a QTabWidget. Every page in the tab contains different stuff... are there any function call that i can find out what it contains?

2

Monday, December 27th 2004, 7:54am

RE: Is it possible to know what the widget contain?

traversal all widgets and compare the parent widget may work.

I'm not sure about it.
I'm baif:)

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

3

Monday, December 27th 2004, 8:08am

RE: Is it possible to know what the widget contain?

Do you want to know which tab that is active? Use the QTabWidget::currentPage method.

4

Wednesday, December 29th 2004, 2:38am

RE: Is it possible to know what the widget contain?

I want to know what that page contains... not the page index

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

5

Wednesday, December 29th 2004, 7:31am

RE: Is it possible to know what the widget contain?

currentPage returns a QWidget* - i.e. the contents of the current page. If this isn't what you are after, please try to rephrase your question abit so that I can get it.

6

Wednesday, December 29th 2004, 7:58am

RE: Is it possible to know what the widget contain?

I wonder if there is a command I can find out what things is insider the widget (like pushbutton, LCD...)

sorry for my bad english

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

7

Wednesday, December 29th 2004, 9:59am

RE: Is it possible to know what the widget contain?

1. As a programmer you should know what have you put there :)
2. You can keep a list of widgets for ecery page and anytime you add a widget, add it to your list.
3. You can use QObject::children() to get a list of children of a widget and then iterate over it and look for widgets (as not all QObjects are widgets).