Hi,

i'm using a WTableView in a WDialog. The dialog is resizable (a small
code example below).

When i resize the dialog (with the mouse), the WTableView is not
resizing to the new size. When i select the list-item, the WTableView is
correctly adjusted in the Dialog again.

What's the cause of this behaviour? Is it a bug, or are there any
circumstances in my example which prevent the correct resizing?

Thank you in advance.

{code}

Wt::WDialog dialog("Test");
dialog.setResizable(true);
dialog.resize(500, 300);
dialog.setMinimumSize(250, 100);

auto layout = new WVBoxLayout(dialog.contents());

auto table = new WTableView;
table->setSelectionMode(SingleSelection);
layout->addWidget(table, 1);

auto btn = new WPushButton("Close");
btn->clicked().connect(&dialog, &WDialog::accept);
layout->addWidget(btn);

Wt::WStandardItemModel* model = new WStandardItemModel(0, 4);
model->setHeaderData(0, Horizontal, WString("Col 1"));
model->setHeaderData(1, Horizontal, WString("Col 2"));
model->setHeaderData(2, Horizontal, WString("Col 3"));
model->setHeaderData(3, Horizontal, WString("Col 4"));

std::vector<Wt::WStandardItem*> items;
items.push_back(new WStandardItem("a"));
items.push_back(new WStandardItem("b"));
items.push_back(new WStandardItem("c"));
items.push_back(new WStandardItem("d"));
model->appendRow(items);

table->setModel(model);

dialog.exec();

{code}

Best regards,
Steven

________________________________

GenoData EDV-Systeme GmbH
Oskar-von-Miller-Straße 2
76829 Landau

Internet: http://www.genodata.de
E-Mail: [email protected]
Telefon: 06341/558955
Fax: 06341/558954

Geschäftsführer: Katharina Lederle, Michael Blömer
Registergericht: Amtsgericht Landau
Sitz der Gesellschaft: Landau
Handelsregisternummer: HRB 2970
_____________________________________________________________________

Der Versand und der Empfang von E-Mails dient der Beschleunigung der
Kommunikation und der Vorbereitung von Geschäftsabschlüssen bzw. der
Begleitung und Unterstützung der Kundenbetreuung. Auf dem Weg von
Absender zu Empfänger können E-Mails mitgelesen, verfälscht, nicht
oder verspätet zugestellt werden. Aus diesen Gründen können Verträge
und Willenserklärungen per E-Mail nicht wirksam abgeschlossen bzw.
abgegeben werden. Diese Erklärungen werden erst nach schriftlicher
Bestätigung wirksam.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to