Giter Site home page Giter Site logo

QTableView / QTableWidget about qt HOT 13 CLOSED

therecipe avatar therecipe commented on August 28, 2024
QTableView / QTableWidget

from qt.

Comments (13)

therecipe avatar therecipe commented on August 28, 2024

Hey

Yes, I will look into this.
So, that these will come along with the update to qt 5.6.

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

That sounds great. Thanks.

from qt.

therecipe avatar therecipe commented on August 28, 2024

They are implemented :)
I pushed the changes earlier, because the update to 5.6 will take a little longer.

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

Oh wow! That was quick. I'll test it out asap.

Is there a way to donate to the project?

from qt.

therecipe avatar therecipe commented on August 28, 2024

Thank you for the offer, I appreciate it.
But there is no need to donate :)

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

I haven't asked you to implement Qt WebEngine yet though :) Maybe then you will reconsider?

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

Hi -

Testing out pixmap. First version (below) works. Second version attempting to include '.tiff' format using QImageReader (ex ref http://blog.elangroup-software.com/2015/09/qimagereader-how-to-use-and-whats-new.html) I can't find a Read method that returns a QImage. Also, in NewQImageReader3 the second parameter asks for 'format core.QByteArray_ITF' yet (ref http://doc.qt.io/qt-5/qimagereader.html#format) the format method returns what looks like a string.

Thanks

    func TreeViewCurrentChanged(current *core.QModelIndex, previous *core.QModelIndex) {
        FileName := FsModel.FileName(current)
        FilePath := FsModel.FilePath(current)

        FsTreeView.ScrollTo(current, 0) // 0 = Ensure Visible, 3 = PositionAtCenter

        statusbar.ShowMessage(FilePath, 0)

        s := strings.ToLower(path.Ext(FileName))

        switch s {
        case ".png", ".jpg":
            pix := gui.NewQPixmap4(FilePath, "", 0)

            scene.AddPixmap(pix)
            view.SetScene(scene)
            view.Show()

        default:
            scene.Clear()
            view.SetScene(scene)
            view.Show()
        }

    }


    func TreeViewCurrentChanged(current *core.QModelIndex, previous *core.QModelIndex) {
        FileName := FsModel.FileName(current)
        FilePath := FsModel.FilePath(current)

        FsTreeView.ScrollTo(current, 0) // 0 = Ensure Visible, 3 = PositionAtCenter

        statusbar.ShowMessage(FilePath, 0)

        s := strings.ToLower(path.Ext(FileName))
        f := strings.TrimLeft(s, ".")

        switch s {
        case ".png", ".jpg", ".tiff":

            ir := gui.NewQImageReader3(FilePath, f)
            img := ir.Read2()
            pix := gui.QPixmap.ConvertFromImage(img,0)

            scene.AddPixmap(pix)
            view.SetScene(scene)
            view.Show()

        default:
            scene.Clear()
            view.SetScene(scene)
            view.Show()
        }

    }

from qt.

therecipe avatar therecipe commented on August 28, 2024

I will look into this.

from qt.

therecipe avatar therecipe commented on August 28, 2024

Okay, these should work now.

    var (
        ir  = gui.NewQImageReader3(FilePath, "tiff")
        img = gui.NewQImage()
        pix = gui.NewQPixmap()
    )
    ir.Read2(img)
    pix.ConvertFromImage(img, 0)
    var (
        ir  = gui.NewQImageReader3(FilePath, "tiff")
        img = ir.Read()
        pix = gui.QPixmap_FromImage(img, 0)
    )

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024
    λ qtdeploy


    build
    output:# local/qt_test
    .\test1.go:80: FsModel.SetRootPath undefined (type *widgets.QFileSystemModel has no field or method SetRootPath)
    .\test1.go:84: FsTreeView.SetRootIndex undefined (type *widgets.QTreeView has no field or method SetRootIndex)
    .\test1.go:84: FsModel.Index2 undefined (type *widgets.QFileSystemModel has no field or method Index2)
    .\test1.go:89: FsTreeView.ConnectCurrentChanged undefined (type *widgets.QTreeView has no field or method ConnectCurrentChanged)

    error:exit status 2

from qt.

therecipe avatar therecipe commented on August 28, 2024

I pushed the changes 100b067
It should work now :)

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

:) Thanks

from qt.

5k3105 avatar 5k3105 commented on August 28, 2024

tiff is working! QTableWidget working! Thanks!

from qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.