Results 1 to 3 of 3

Thread: Designer Plugin - multiple labels button

  1. #1
    Join Date
    Apr 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Designer Plugin - multiple labels button

    Hi,

    I am trying to develop a ne type of button, whitch can display up to four labels or symbols.

    This is quite easy, until I try to get it working in QtDesigner. I already have my new button, an heavily customized QPushButton, showing as a custom plugin, and its properties available through the property editor.

    What I would like, though, is to be able, when double clicking one of the four regions of my button, to display an on-place editor to customize the corresponding label, instead of editing the QPushButton text.

    I can't find how to do that in Qt documentation.

    Does anybody know whether this is even possible ?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Designer Plugin - multiple labels button

    Create a task menu extension:
    http://doc.qt.nokia.com/4.7/designer...xtensions.html

    Then when your custom action is triggered, create a dialog with the settings.

  3. #3
    Join Date
    Apr 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer Plugin - multiple labels button

    Yes, that would work, but that is not exactly what I had in mind.
    My class extends the QPushButton class. Thus, when I double click it on the form editor in QtDesigner, it shows a line edit to modify the QPushButton text. What I wanted to do was to override this behaviour in a way that when I double click, it shows a line edit on one quarter of my button to edit one of its four labels.

    However, after searching into QtDesigner source code where this behaviour (for QPushButtons) was coded, I think what I intended might not be possible without modifying the Designer source code .

Similar Threads

  1. QWT plugin for QT Designer
    By gandalf in forum Newbie
    Replies: 1
    Last Post: 3rd May 2010, 16:16
  2. Multiple choice button
    By grisson in forum Qt Programming
    Replies: 2
    Last Post: 27th February 2010, 10:54
  3. multiple designer plugin in one DLL.
    By janEUcitzen in forum Qt Programming
    Replies: 5
    Last Post: 11th March 2009, 10:41
  4. Designer plugin segfaults designer :(
    By tmarki in forum Qt Tools
    Replies: 4
    Last Post: 26th September 2007, 11:22
  5. Replies: 1
    Last Post: 22nd January 2007, 12:13

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.