Results 1 to 8 of 8

Thread: opening exe files, comercial version vs opensource

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    22
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Question using selection color dialog

    thanks . I am subscribed .
    Another question:

    I need to create a dialog that will be activated from the main menu
    I want the function to open a dialog that the user can choose color.
    I read I need to use ColorListEditor . still not sure if I need to create a widget? if I understand correctly no need to delete it later?
    what widget to I need to use? is it a window? do I need to implamant it?
    it is common to create new class for this window? or do you usualy create a base class that handle all wndows in the application?
    or do I just inhirate the needed widjet to the function that handle the image?
    hope I am clear
    thanks
    Last edited by Gily; 20th December 2007 at 10:45. Reason: updated contents

  2. #2
    Join Date
    Dec 2007
    Posts
    22
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default and another one

    It there a reson why sometimes the app include in different ways??
    why the different ways are needed and when should I use them?
    Qt Code:
    1. #include <QComboBox>
    2.  
    3. class QColor;
    4. class QWidget;
    5.  
    6. class ColorListEditor : public QComboBox
    7. {
    8. Q_OBJECT
    9. Q_PROPERTY(QColor color READ color WRITE setColor USER true)
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 20th December 2007 at 10:23. Reason: missing [code] tags

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: few general question

    • Use meaningful thread titles. "few general question" tells nothing about actual thread context.
    • Do not ask multiple unrelated questions in same thread.
    • Search Qt docs & examples and the forums first, then ask.


    Quote Originally Posted by Gily View Post
    Another question:
    I want to do sub menu. I mean I have menu in the top of the application with the right slot who calls the function
    like in save ->save function
    Signals and Slots

    now I want the function to open a dialog that the user can choose color.
    I read I need to use ColorListEditor . still not sure if I need to create a widget? if I understand correctly no need to delete it later?
    also not sure what s the result of that class. do I need to use the visual editor for that?
    hope I am clear
    I'm afraid you're not very clear. Of course you need to create a widget if you want to show an additional window. A modal dialog may be allocated on the stack, any other widget may not.

    Quote Originally Posted by Gily View Post
    It there a reson why sometimes the app include in different ways??
    why the different ways are needed and when should I use them?
    Forward declaration
    J-P Nurmi

  4. #4
    Join Date
    Dec 2007
    Posts
    22
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Forward_declaration

    thanks for your answer
    what I wanted to know , if there is common use/agreement for QT users when to use Forward_declaration an when to include?
    is there a way /convention?

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Forward_declaration

    Quote Originally Posted by Gily View Post
    what I wanted to know , if there is common use/agreement for QT users when to use Forward_declaration an when to include?
    is there a way /convention?
    It is a good practice to use forward declarations whenever possible. It will make compilation faster. A forward declaration is enough when the corresponding type is only used as a reference or as a pointer, in other words, when the compiler doesn't need to know actual size of the type. I'm sure this is all explained in more detailed in the given wiki article.
    J-P Nurmi

Similar Threads

  1. QGraphicsView general questions
    By sincnarf in forum Qt Programming
    Replies: 5
    Last Post: 16th October 2007, 00:22
  2. Replies: 1
    Last Post: 15th March 2007, 21:45
  3. Question regarding how to paint after zoom.
    By JonathanForQT4 in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2007, 16:34
  4. QThread exit()/quit() question
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2006, 15:38

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.