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. Buttons in QTextTable
Forum Updated to NodeBB v4.3 + New Features

Buttons in QTextTable

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.9k 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
    bright day
    wrote on last edited by
    #1

    Hi, I'm Qt newbie.
    Is there any way to insert buttons(or, maybe, hyperlinks, that can call functions) directly into QTextTable object?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bright day
      wrote on last edited by
      #2

      ?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Perhaps you should explain a bit more what you want to achieve. Are you sure you want a QTextTable?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rajeevpodar
          wrote on last edited by
          #4

          Try to use QTableWidget and then you can add any widget to the table by using:
          setCellWidget ( int, int, QWidget * )

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bright day
            wrote on last edited by
            #5

            I tried ) And soon came to conclusion, that it's not good idea in my project.
            I need rich text formatting (in particular bold, italic, underlined text, also merging and splitiing table cells) in a table (that's why i chose QTextTable).
            the table has to be completed with data from the database. When the table is completed (with required formatting), the user must be able to add new entries to the table (and the database), and that would be great to have buttons or hyperlinks in the table cells, which will open new window to add the entry.
            Sure, I can place the button beyond the QTextTable object, but

            1. I want the "add entry" window open with different properties, according to cell, where the button located.
            2. Button beyond the table is less handy than one (or hyperlink) inside the table.

            Hope it's more clear know ) What would you advise?

            1 Reply Last reply
            0
            • L Offline
              L Offline
              leon.anavi
              wrote on last edited by
              #6

              Hi,

              In my opinion QGridLayout might suit better for your needs. You can insert QPushButton and QLabel as well as other widget inside the grid layout.

              Best regards,
              Leon

              http://anavi.org/

              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