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. Need some help on QTableview Sorting : SQLTableModel + Qtableview + Sorting Varchar as number
Forum Updated to NodeBB v4.3 + New Features

Need some help on QTableview Sorting : SQLTableModel + Qtableview + Sorting Varchar as number

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 564 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.
  • R Offline
    R Offline
    roahanramesh
    wrote on 29 Jan 2014, 17:53 last edited by
    #1

    Hello,
    Thanks for taking time to read my post. I have a MySQL table with memberid as varchar column. I need to sort it as an integer (Eg. 1, 2, 3 etc) instead of (1, 10, 11... 2). I have read that MySQL has a ORDER BY CLAUSE. (My data is a collection of alphabet and numbers eg AF1, AF10, AF11..AF19, AF2)

    I have also enabled in QTableview : set sorting enabled to true.

    The Question is : How can i enable sorting when the Headerview is clicked to enable the sorting using the ORDER BY CLAUSE.

    Please help.

    1 Reply Last reply
    0

    1/1

    29 Jan 2014, 17:53

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved