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. Toggle button
Forum Updated to NodeBB v4.3 + New Features

Toggle button

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

    Hello,

    I have used QT2.3 with visual C++6 for many year ago, with a lot of applications for my workshop.
    Now, with the new PC and Win 7, I must change IDE and Qt.
    So I have QtCreator and QT5.4.
    But when I want re-compile my olds programs from Qt2.3, Many things goes wrong.

    Many are solved, but for one week, I am stopped by the Toggle Button.
    The problem is:
    I need a GroupButton with 4 pushbutton.
    When I click over one, it must stay "on", and all other must go "off".
    With Qt2.3, QPushButton->setToggleButton(), associated with GroupButton->setExclusive() work fine.
    setToggleButton disapear from Qt5.4.
    How can I solve my problem without many pages of code ?
    I have try setCheckable(), without result.. May be I don't know how use it.
    Sorry for my bad english

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

      Hi and welcome to devnet,

      setToggleButton was move to the Qt 3 support layer during the transition to Qt 4. It as been replaced by setCheckable . Note that the Qt 3 support layer has been removed for Qt 5.

      Since you are migrating from Qt 2 you should also get the Qt 4 documentation handy, you'll find there some information that will help you go further for these cases.

      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