Results 1 to 20 of 23

Thread: wwWidgets

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: wwWidgets

    sorry, now it's working; thanks
    Last edited by mickey; 17th July 2006 at 02:27.
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: wwWidgets

    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
    Qt Code:
    1. ......
    2. wwFloatSpinBox* spinb = (wwFloatSpinBox*) sender();
    3. std::vector<wwFloatSpinBox*> sbc;
    4. sbc.push_back(wwFloatSpinBoxC0);
    5. if (spinb == sbc[0])
    6. printf("hello");
    To copy to clipboard, switch view to plain text mode 
    Regards

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: wwWidgets

    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.

  4. #4
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: wwWidgets

    Quote Originally Posted by mickey
    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
    Qt Code:
    1. ......
    2. object::mySLot(double value) {
    3. cout << value;
    4. wwFloatSpinBox* spinb = (wwFloatSpinBox*) sender();
    5. std::vector<wwFloatSpinBox*> sbc;
    6. sbc.push_back(wwFloatSpinBoxC0);
    7. if (spinb == sbc[0])
    8. printf("hello");
    9. }
    To copy to clipboard, switch view to plain text mode 
    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......
    Regards

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: wwWidgets

    Try printf("Hello\n") instead.

  6. #6
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: wwWidgets

    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
    Regards

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: wwWidgets

    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).

  8. #8
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: wwWidgets

    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
    -----
    Last edited by mickey; 17th July 2006 at 16:37.
    Regards

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.