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. CommandLink Button and custom style
Forum Updated to NodeBB v4.3 + New Features

CommandLink Button and custom style

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.5k 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
    HarryCodder
    wrote on last edited by
    #1

    Hello everyone,

    I'm new to QT and I have to draw a command link button with a custom style.

    My problem is QCommandLinkButton does not go through the QProxyStyle::drawControl method to draw its label and icon, it goes directly to QProxyStyle::drawItemText.

    QPushButton for instance does not behave like this.

    Is this a bug or did I miss something ?
    If anyone knows how to bypass/change this behaviour, it would be really helpful.

    Thanks in advance.

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

      Hi and welcome
      If it dont respond well to stylesheets, cant you just
      set it in Designer or via code?
      You can change both font and icon so what do you need for your custom style?

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

        Hi and welcome to devnet,

        Following the documentation, i'd say it's not a bug. QCommandLinkButton is a Vista styled button.

        If you need to customize it even more, why not start from QPushButton directly ?

        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