Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Regarding the exposing of the properties using Q_Property
Forum Updated to NodeBB v4.3 + New Features

Regarding the exposing of the properties using Q_Property

Scheduled Pinned Locked Moved Unsolved General and Desktop
39 Posts 4 Posters 12.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pradeep KumarP Pradeep Kumar

    Hi,

    Posted the same query in WinCC OA forum

    the below is the link

    https://portal.etm.at/index.php?option=com_kunena&Itemid=75&func=view&catid=16&id=4804#4819

    They said its automatically done by Gedi.
    and going through the documentation, and how to provide the properties as string , QVariant so the gedi understands?.

    Thanks,

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #27

    @Pradeep-Kumar
    Ok so no QStringList for us.
    Then yes, seems it just need to be normal Qt properties ( with Q_PROPERTY)
    and Gedi ( what ever that is) should just do it.

    1 Reply Last reply
    0
    • Pradeep KumarP Offline
      Pradeep KumarP Offline
      Pradeep Kumar
      wrote on last edited by
      #28

      k thats what i am figuring what datatypr should i use to make Gedi understand , so i will get toolbutton and combobox.

      Thanks,

      Pradeep Kumar
      Qt,QML Developer

      mrjjM 1 Reply Last reply
      0
      • Pradeep KumarP Pradeep Kumar

        k thats what i am figuring what datatypr should i use to make Gedi understand , so i will get toolbutton and combobox.

        Thanks,

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #29

        @Pradeep-Kumar
        Well the dude says it takes QColor, QPen, QBrush, QFont, QPoint
        so I would just try and see what you get :)

        1 Reply Last reply
        0
        • Pradeep KumarP Offline
          Pradeep KumarP Offline
          Pradeep Kumar
          wrote on last edited by
          #30

          Thats what i m figuring but the thing is i require the root of how it has be done.

          Thanks,

          Pradeep Kumar
          Qt,QML Developer

          mrjjM 1 Reply Last reply
          0
          • Pradeep KumarP Pradeep Kumar

            Thats what i m figuring but the thing is i require the root of how it has be done.

            Thanks,

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #31

            @Pradeep-Kumar

            • i require the root of how it has be done.

            in Qt or Gedi related ?

            1 Reply Last reply
            0
            • Pradeep KumarP Offline
              Pradeep KumarP Offline
              Pradeep Kumar
              wrote on last edited by
              #32

              Hi,

              from Qt perspective , and how gedi will come to know to provide toolbutton.

              Thanks,

              Pradeep Kumar
              Qt,QML Developer

              mrjjM 1 Reply Last reply
              0
              • Pradeep KumarP Pradeep Kumar

                Hi,

                from Qt perspective , and how gedi will come to know to provide toolbutton.

                Thanks,

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #33

                @Pradeep-Kumar

                Well just define properties and make sure you have Q_OBJECT macro in the class.
                Then Qt part should be fine.

                For Gedi, you should ask other forum. It's not possible to know what is required for Gedi to load
                your code. With Creator it's a plugin (DLL) but i have no idea what Gedi is or how to make it load
                any Qt code and in what form that code should be.

                So the most important info is still msising

                What does Gedi support / wants / have ?

                1 Reply Last reply
                2
                • Pradeep KumarP Offline
                  Pradeep KumarP Offline
                  Pradeep Kumar
                  wrote on last edited by
                  #34

                  Hi,

                  @mrjj

                  using the datatypes bool i am able to get combobox in extended properties.

                  And using QBrush,QColor i am getting toolbutton,

                  Q_PROPERTY(QBrush brush READ getBrush WRITE setBrush DESIGNABLE true)
                  
                  void BaseWidget::setBrush(QBrush brush)
                  {
                     //    m_brush = brush;
                  
                     m_widget = new QWidget;
                     m_widget->setWindowTitle("toolbutton");
                     m_widget->show();
                  }
                  
                  QBrush BaseWidget::getBrush()
                  {
                     return m_brush;
                  }
                  

                  on click of toolbutton, we need the widget which we created , but the default widget is poping up, how can it be avoided?.

                  Thanks,

                  Pradeep Kumar
                  Qt,QML Developer

                  1 Reply Last reply
                  0
                  • mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #35

                    Hi
                    -click of toolbutton, we need the widget which we created , but the default widget is poping up, how can it be avoided?

                    I have no idea what you mean :)

                    Can you please show code for

                    • the widget which we created
                      ( what widget ?)

                    and the code click of toolbutton
                    and then what default widget is. ?

                    if you mean that , inside Gedi, the editor there - shows a default something and not Class X, you have created
                    then please tell more what you do. Else it might be better to ask Gedi forum.

                    1 Reply Last reply
                    0
                    • Pradeep KumarP Offline
                      Pradeep KumarP Offline
                      Pradeep Kumar
                      wrote on last edited by Pradeep Kumar
                      #36

                      Hi,

                      When we click on tollbutton,

                      https://i.imgsafe.org/739c70e6f0.png

                      setter function is called then, the below widget is poping up

                      https://i.imgsafe.org/73a0892228.png

                      , after click on ok in the above widget , the widget which we created is poping up.

                      https://i.imgsafe.org/73a49cabfd.png

                      This widget we created.

                      My question was when we click on tollbutton in extended properties , cant we have 3 image widget to get poped up?.

                      Q_PROPERTY(QBrush brush READ getBrush WRITE setBrush DESIGNABLE true)
                      
                      void BaseWidget::setBrush(QBrush brush)
                      {
                         //    m_brush = brush;
                      
                         m_widget = new QWidget;
                         m_widget->setWindowTitle("toolbutton");
                         m_widget->show();
                      }
                      
                      QBrush BaseWidget::getBrush()
                      {
                         return m_brush;
                      }
                      

                      Thanks,

                      Pradeep Kumar
                      Qt,QML Developer

                      mrjjM 1 Reply Last reply
                      0
                      • Pradeep KumarP Pradeep Kumar

                        Hi,

                        When we click on tollbutton,

                        https://i.imgsafe.org/739c70e6f0.png

                        setter function is called then, the below widget is poping up

                        https://i.imgsafe.org/73a0892228.png

                        , after click on ok in the above widget , the widget which we created is poping up.

                        https://i.imgsafe.org/73a49cabfd.png

                        This widget we created.

                        My question was when we click on tollbutton in extended properties , cant we have 3 image widget to get poped up?.

                        Q_PROPERTY(QBrush brush READ getBrush WRITE setBrush DESIGNABLE true)
                        
                        void BaseWidget::setBrush(QBrush brush)
                        {
                           //    m_brush = brush;
                        
                           m_widget = new QWidget;
                           m_widget->setWindowTitle("toolbutton");
                           m_widget->show();
                        }
                        
                        QBrush BaseWidget::getBrush()
                        {
                           return m_brush;
                        }
                        

                        Thanks,

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #37

                        @Pradeep-Kumar
                        Sorry, i don't know that. It is not a Qt thing so whatever that "extended properties"
                        really is, I guess its the one who controls what shall be opened.
                        So i guess it sees the Brush and then the Brush Dialog comes.
                        So unless you can register a Type and a Window for that type, i guess you
                        cannot.

                        Maybe there is some sort of Custom Type that allows custom windows.

                        1 Reply Last reply
                        0
                        • Pradeep KumarP Offline
                          Pradeep KumarP Offline
                          Pradeep Kumar
                          wrote on last edited by
                          #38

                          can u explain how to register the type for WinCC OA?.

                          Thanks,

                          Pradeep Kumar
                          Qt,QML Developer

                          kshegunovK 1 Reply Last reply
                          0
                          • Pradeep KumarP Pradeep Kumar

                            can u explain how to register the type for WinCC OA?.

                            Thanks,

                            kshegunovK Offline
                            kshegunovK Offline
                            kshegunov
                            Moderators
                            wrote on last edited by
                            #39

                            @Pradeep-Kumar said in Regarding the exposing of the properties using Q_Property:

                            can u explain how to register the type for WinCC OA?.

                            He can't, and neither can I. You should really ask that question - about substituting the dialog window with your own one - on the Gedi forums, as it entirely depends on the application. If the application doesn't have that feature, you won't be able to do it.

                            Read and abide by the Qt Code of Conduct

                            1 Reply Last reply
                            1

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved