Results 1 to 2 of 2

Thread: Declaration not working

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    22
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Declaration not working

    Hi All,

    I have a problem in QT Designer. And i do not have the right words to address my problem. So please apologize if i tell anything wrong.

    Qt Code:
    1. void ColorPref::High_Range()
    2. {
    3.  
    4. this->Obj_Dec();
    5. hr->setPaletteBackgroundColor(color_hr);
    6. ok->setEnabled(TRUE);
    7.  
    8. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void ColorPref::Obj_Dec()
    2. {
    3. QColor color_hr = QColorDialog::getColor(
    4. QColor(),
    5. this, "color dialog" );
    6. }
    To copy to clipboard, switch view to plain text mode 

    These are two functions. Obj_Dec() is a function that declares the QColor object.
    And I am calling it from the function High_Range();

    It gives the following error

    .ui/../ColorPref.ui.h: In member function `virtual void ColorPref::High_Range()':
    .ui/../ColorPref.ui.h:27: error: `color_hr' undeclared (first use this function).ui/../ColorPref.ui.h:27: error: (Each undeclared identifier is reported only on


    Can anyone plz tell me as to why this is happening and hence solve the error.

    Note :- Obj_Dec() is Public

    Thanks and Regards
    Kenny
    Last edited by wysota; 1st March 2007 at 10:11. Reason: missing [code] tags

Similar Threads

  1. QTextEdit::find() backward not working
    By sukanyarn in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2006, 19:33
  2. Compile Errors
    By luffy27 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 05:26
  3. Connect not working
    By xgoan in forum Qt Programming
    Replies: 4
    Last Post: 24th July 2006, 11:27
  4. Replies: 1
    Last Post: 11th June 2006, 22:25
  5. Mac OS X UI not working
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2006, 01:02

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.