Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 7

Qt-interest Archive, March 2002
what kind of widget has been used in the QTdesigner for the widget property editor (window on the left)


Message 1 in thread

Hi, I am trying to make a table-like widget that functions similarly to
the Qt Designer's widget property widget (located in the floating window
on the left by default). I think that the widget uses QTable, but the
problem is that qtable does not seem to have an option of titling
columns and/or rows, as well as potentially hiding rows and/or columns.
Could anyone please tell me if there is a widget that I am not aware of
that does this, or if there is a method in Qtable that enables me to
change column names from the numbers into a string value.

Any help would be greatly appreciated! Sincerely,

Ivica Ico Bukvic, composer, multimedia sculptor, 
programmer, webmaster & computer consultant 
http://meowing.ccm.uc.edu/~ico/ 
ico@fuse.net 
============================
"To be is to do"   - Socrates
"To do is to be"   - Sartre
"Do be do be do"   - Sinatra
"I am"             - God


Message 2 in thread

> Hi, I am trying to make a table-like widget that functions similarly to
> the Qt Designer's widget property widget (located in the floating window
> on the left by default). I think that the widget uses QTable, but the
> problem is that qtable does not seem to have an option of titling
> columns and/or rows, as well as potentially hiding rows and/or columns.

Yes it does, try:

myTable->horizontalHeader()->setLabel( 0, "Hey look at that!");

and gee...I wonder what the QTable::hideRow(int) and QTable::hideColumn(int)
methods do...

:) cheers
Jeremy


Message 3 in thread

> Yes it does, try:
> 
> myTable->horizontalHeader()->setLabel( 0, "Hey look at that!");
> 
> and gee...I wonder what the QTable::hideRow(int) and
> QTable::hideColumn(int)
> methods do...
> 
> :) cheers
> Jeremy

DOH!!! :-)

Thx!


Message 4 in thread

The property editor does not use QTable but QListView, have a look at 
$(QTDIR)/tools/designer/designer/propertyeditor.h

Fabian

-- 
 [ signature omitted ] 

Message 5 in thread

I had tried to do what you want and reviewed QtDesigner 
codes before.
The "property editor" in QtDesigner is implemented by using 
custom classes derived from QListView/QListViewItem. I 
think these are good examples for you too.

The files are:
  $QTDIR/tools/designer/designer/propertyeditor.h
  $QTDIR/tools/designer/designer/propertyeditor.cpp

Good Luck!

Naoyuki


On 2002 March 19 Tuesday 04:47, Ivica Bukvic wrote:
> Hi, I am trying to make a table-like widget that
> functions similarly to the Qt Designer's widget property
> widget (located in the floating window on the left by
> default). I think that the widget uses QTable, but the
> problem is that qtable does not seem to have an option of
> titling columns and/or rows, as well as potentially
> hiding rows and/or columns. Could anyone please tell me
> if there is a widget that I am not aware of that does
> this, or if there is a method in Qtable that enables me
> to change column names from the numbers into a string
> value.
>
> Any help would be greatly appreciated! Sincerely,
>
> Ivica Ico Bukvic, composer, multimedia sculptor,
> programmer, webmaster & computer consultant
> http://meowing.ccm.uc.edu/~ico/
> ico@fuse.net
> ============================
> "To be is to do"   - Socrates
> "To do is to be"   - Sartre
> "Do be do be do"   - Sinatra
> "I am"             - God