Results 1 to 14 of 14

Thread: EXtend functionality of QListWidget by making a plugin and use it in designer?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: EXtend functionality of QListWidget by making a plugin and use it in designer?

    Quote Originally Posted by Sisyfos View Post
    Here is onehttp://www.qtforum.org/thread.php?th...ght=Q+PROPERTY), that is asking exactly what i am asking.
    It's not exactly what you are asking. The poster there can't add any properties, and you can't see the ones which are already there.

    So i am starting to think it is not possible.
    I assure you it's possible.

    I think that it is only possible to edit the properties of the base class QWidget even though the documentation vaguely suggests that it is supposed to be possible to make the properties editable in designer by declaring Q_PROPERTY() in the class declaration.
    SO if someone can prove me wrong i will jump with joy.
    Of course it's possible to add new properties and to see existing ones.

    Here you go, you may base your widget on the code attached.
    Attached Files Attached Files
    Last edited by wysota; 13th December 2006 at 22:18. Reason: Added the example code

  2. The following user says thank you to wysota for this useful post:

    Sisyfos (13th December 2006)

  3. #2
    Join Date
    Dec 2006
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: EXtend functionality of QListWidget by making a plugin and use it in designer?

    I have not yet had the time to analyse exactly what i did wrong. I will have to look at that in the morning when my brain has regained capacity enough to grasp what u have done. BUT i just wanted to thank u so VERY much for taking the time to look at my sad example and point me in the right direction. I have tried for two days now to figure out what u did in a couple of minutes. So it is really a load of my shoulders. Again THX!

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

    Default Re: EXtend functionality of QListWidget by making a plugin and use it in designer?

    That's not my first Qt Designer plugin, I also learned on my mistakes while making my first plugins.

  5. #4
    Join Date
    Dec 2006
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: EXtend functionality of QListWidget by making a plugin and use it in designer?

    Quote Originally Posted by wysota View Post
    That's not my first Qt Designer plugin, I also learned on my mistakes while making my first plugins.
    I sort of figured it was not your first plugin
    There were a number of problems with my code but most of all i had not understod the part where u call the base class constructor which seems to have caused some problems. But on thing i am wondering about is it really necessary to include the QCoreApplication. Cause it seems as if it was needed in my program but it is not clear from the documentation that it is needed in cases like this.
    BUT then again i dont find the documentation to be very good it leaves a lot of guessing to be done.

    Anyway i changed my code according to your example that u attached and now everything works just fine and i am happy as a clam.
    I recommend all ppl that are having any problems with their plugins to take a look at the code that Wysota has attached. It is a good base to stand on.

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

    Default Re: EXtend functionality of QListWidget by making a plugin and use it in designer?

    Quote Originally Posted by Sisyfos View Post
    But on thing i am wondering about is it really necessary to include the QCoreApplication. Cause it seems as if it was needed in my program but it is not clear from the documentation that it is needed in cases like this.
    QCoreApplication is responsible for initialising plugins.

    BUT then again i dont find the documentation to be very good it leaves a lot of guessing to be done.
    That's your opinion According to me it just doesn't try to be smarter than the reader as some docs do.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.