multicell test added

This commit is contained in:
Uwe Rathmann 2019-07-27 12:37:48 +02:00
parent f5ee8a3853
commit b71ce92f10

View File

@ -14,16 +14,17 @@ class MainBox : public TestBox
public:
MainBox( int id )
{
using Testcase = void (MainBox::*)();
using Testcase = void ( MainBox::* )();
const Testcase tests[] =
{
&MainBox::test0, &MainBox::test1, &MainBox::test2,
&MainBox::test3, &MainBox::test4, &MainBox::test5,
&MainBox::test6, &MainBox::test7, &MainBox::test8
&MainBox::test6, &MainBox::test7, &MainBox::test8,
&MainBox::test9
};
const int count = static_cast<int>( sizeof( tests ) / sizeof( tests[0] ) );
const int count = static_cast< int >( sizeof( tests ) / sizeof( tests[0] ) );
if ( id < 0 || id >= count )
id = 0;
@ -49,6 +50,7 @@ class MainBox : public TestBox
void test6();
void test7();
void test8();
void test9();
};
void MainBox::test0()
@ -241,6 +243,25 @@ void MainBox::test8()
}
}
void MainBox::test9()
{
/*
This one is a bit unclear about how much space from the first
element goes to column 1/2. Skinny gives 50% to both,
while QGridLayoutEngine gives 100% to column 1 ( starting
at 0 + spacing() ). The Widgets implementation seems to be
wrong as column 1 grows beyond 100%.
The situation can be clarified by using setColumnFixedWidth -
unfortunately Quick does not support this.
*/
insert( "PaleVioletRed", 0, 0, 1, 2 );
insert( "DarkSeaGreen", 1, 1 );
setFixedWidthAt( 0, 100 );
//setColumnFixedWidth( 0, 50 );
}
int main( int argc, char** argv )
{
QApplication a( argc, argv );