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. working of QstlyePlugin
Forum Updated to NodeBB v4.3 + New Features

working of QstlyePlugin

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.1k Views 2 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.
  • H Offline
    H Offline
    hjohn
    wrote on last edited by
    #1

    Example of QStylePlugin from QDocument:
    http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html

    how polish function of simplestyle class is getting called.i know about create and keys() function,they are internally called by qstylefactory .

    raven-worxR 1 Reply Last reply
    0
    • H hjohn

      Example of QStylePlugin from QDocument:
      http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html

      how polish function of simplestyle class is getting called.i know about create and keys() function,they are internally called by qstylefactory .

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @hjohn said in working of QstlyePlugin:

      how polish function of simplestyle class is getting called

      see QStyle::polish()

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      H 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @hjohn said in working of QstlyePlugin:

        how polish function of simplestyle class is getting called

        see QStyle::polish()

        H Offline
        H Offline
        hjohn
        wrote on last edited by
        #3

        @raven-worx does it mean it will get called in the background when QWidget runs .

        raven-worxR 1 Reply Last reply
        0
        • H hjohn

          @raven-worx does it mean it will get called in the background when QWidget runs .

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @hjohn
          since it is a reimplementation of a Qt API method, Qt takes care when to call it.
          But what do you want to achieve?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          H 1 Reply Last reply
          0
          • raven-worxR raven-worx

            @hjohn
            since it is a reimplementation of a Qt API method, Qt takes care when to call it.
            But what do you want to achieve?

            H Offline
            H Offline
            hjohn
            wrote on last edited by hjohn
            #5

            @raven-worx actually i am just trying to implement plugin same as QStyleplugin.
            Want to understand how it works internally.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hjohn
              wrote on last edited by
              #6

              @raven-worx In example of QStyleplugin :

              http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html

              keys() returns a list of style names that this plugin can create
              

              How to know how many style plugin can create.?
              In Qt document there is no any list of style name.and example shows of only one style.

              raven-worxR 1 Reply Last reply
              0
              • H hjohn

                @raven-worx In example of QStyleplugin :

                http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html

                keys() returns a list of style names that this plugin can create
                

                How to know how many style plugin can create.?
                In Qt document there is no any list of style name.and example shows of only one style.

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @hjohn said in working of QstlyePlugin:

                How to know how many style plugin can create.?

                you decide how many styles your plugin can create and how to name them. see the create() method

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                H 1 Reply Last reply
                0
                • raven-worxR raven-worx

                  @hjohn said in working of QstlyePlugin:

                  How to know how many style plugin can create.?

                  you decide how many styles your plugin can create and how to name them. see the create() method

                  H Offline
                  H Offline
                  hjohn
                  wrote on last edited by hjohn
                  #8

                  @raven-worx Here in qstyleplugin example,one style is "simple style" and another one we can add is "fusion" style. they are in-built style. In this case we can not create our own style.
                  I think in create() method,we manually give style as argument by,

                  QApplication::setStyle(QStyleFactory::create("simplestyle"));
                  

                  here "simplestyle" is given manually which is built in style.

                  you decide how many styles your plugin can create and how to name them. see the create() method

                  In this case we can not create my own style in my plugin.we have to provide built-in style (provided by QT) to my plugin.if I am right then how to know that built-in styles?
                  Bare with me, I am new in this The High-Level API plugin.I might be wrong.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Hi,

                    Maybe a silly question but are you also following the folder setup from the simple plugin example ? Especially where the plugins is located after building ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

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