PDA

View Full Version : wwWidgets



mickey
4th July 2006, 13:24
HI, Are wwWidgtes working?

wysota
4th July 2006, 15:03
In what way? What's wrong with them?

mickey
4th July 2006, 15:42
sorry wasn't there a problem with floatSpinBox? I said you many posts ago....

wysota
4th July 2006, 18:35
Yes, there was. But this doesn't neglect all other widgets in the set.

mickey
5th July 2006, 09:24
ok sorry, an information; now I'll have to put again float spinBox from desinger or is sufficient overwrite old .h .cpp and compile my app?

mickey
5th July 2006, 14:52
Anyone know why this error? thanks


connect(wwFloatSpinBoxProve, SIGNAL(valueChanged(double)), this, SLOT(PROVE(double)));
mymainform.cpp(197): error C2664: 'bool QObject::connect(const QObject *,const char *,const QObject *,const char *)' : cannot convert parameter 1 from 'wwFloatSpinBox *' to 'const QObject *'

jacek
5th July 2006, 16:11
Probably you are missing some #include directive.

wysota
5th July 2006, 19:59
ok sorry, an information; now I'll have to put again float spinBox from desinger or is sufficient overwrite old .h .cpp and compile my app?

Just rewrite the source files. Signal and slot names didn't change. And make sure you have the latest release of the widget.

mickey
6th July 2006, 10:26
sorry maybe i ddin't understand. I downloaded last July version; I overwritted .h .cpp files, but doesn't work. I tried to compile and overwrite .dll in qt directory and put new spinboxes, but doesn't work; what am I doing wrong? thanks

mickey
16th July 2006, 13:59
sorry, but are floatSpinBoxes working? I tried they but seem don't work.

jacek
16th July 2006, 14:53
I tried they but seem don't work.
Define "seem don't work".

mickey
16th July 2006, 14:56
I connect a float spinBox from designer to a SLOT in mainForm; the SLOT isn't called; it was a old bug; it should be fixed, but it don't seem...

wysota
16th July 2006, 15:58
I have rewritten much of the spinbox code today, download the latest version (0.3.3), I have tested it as much as I could and it seems to work fine. There is a small issue with setting initial values smaller than the line step, but it might be caused by Designer and not the class itself.

mickey
16th July 2006, 18:07
hi, I tel you this compile error


wwfloatspinbox.cpp(94) : error C2059: syntax error : ')'

if I connect from desinger don't work; it works if I connect by end; I didn't find diference if I set minValue >=1.

wysota
16th July 2006, 22:25
Ah, yes, there is an additional closing bracket for Qt versions that don't support QLocale, but it's enough if you just delete it.

About your slot problems... maybe you have an error somewhere? Which signal-slot connections don't work for you? I tested the valueChanged(double)/setValue(double) connection and it worked fine from within Designer.

mickey
17th July 2006, 02:11
sorry, now it's working; thanks

mickey
17th July 2006, 03:02
Another problem's arising; i don't know if could depend from wwSpin but this code below don't work. DO anyone see the error? thanks


......
wwFloatSpinBox* spinb = (wwFloatSpinBox*) sender();
std::vector<wwFloatSpinBox*> sbc;
sbc.push_back(wwFloatSpinBoxC0);
if (spinb == sbc[0])
printf("hello");

wysota
17th July 2006, 09:31
What does "don't work" mean? The spinbox doesn't have anything to do here, you're operating on pointers to them only, so you can't blaim the object for anything.

mickey
17th July 2006, 12:19
Another problem's arising; i don't know if could depend from wwSpin but this code below don't work. DO anyone see the error? thanks


......
object::mySLot(double value) {
cout << value;
wwFloatSpinBox* spinb = (wwFloatSpinBox*) sender();
std::vector<wwFloatSpinBox*> sbc;
sbc.push_back(wwFloatSpinBoxC0);
if (spinb == sbc[0])
printf("hello");
}

When I change wwSpinBox value this SLOT is called (it works), but "hello" isn't printed; with QSpinBox this worked! I need to know who's the sender...thanks......

wysota
17th July 2006, 12:35
Try printf("Hello\n") instead.

mickey
17th July 2006, 13:09
sorry, inside my if there isn't only a printf....nothing inside it isn't excuted...anyway I just putted printf("hello\n") it dosn't work; thanks

wysota
17th July 2006, 14:09
Maybe wwFloatSpinBoxC0 is not the one emitting the signal? You can print those pointers (either from your app or a debugger) and compare them yourself (and using a debugger you can even check properties of those objects).

mickey
17th July 2006, 15:20
they work. i'm sorry.thanks
but why if I set spinbox value eg 2, when I launch my app appear 0.2????
---
it need set it by hand....desinger seems doesn't work for this aim
-----