Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ring Desktop, WebAssembly and Mobile Using QTreeView and QFileSystemModel

Load "guilib.ring"

New qApp {

        win1 = New qWidget() {

                setwindowtitle("Using QTreeView and QFileSystemModel")
                setGeometry(100,100,500,400)

                New qtreeview(win1) {
                        setGeometry(00,00,500,400)
                        oDir = new QDir()
                        ofile = new QFileSystemModel()
                        ofile.setrootpath(oDir.currentpath())
                        setmodel(ofile)
                }

                show()
        }

        exec()
}
Comment

ring Desktop, WebAssembly and Mobile Using QTreeWidget and QTreeWidgetItem

Load "guilib.ring"

New qApp {

        win1 = new qWidget() {

                setwindowtitle("TreeWidget")
                setGeometry(100,100,400,400)

                layout1 = new qvboxlayout()

                tree1 = new qtreewidget(win1) {
                        setGeometry(00,00,400,400)
                        setcolumncount(1)
                        myitem = new qtreewidgetitem()
                        myitem.settext(0,"The First Step")
                        addtoplevelitem(myitem)
                        for  x = 1 to 10
                                myitem2 = new qtreewidgetitem()
                                myitem2.settext(0,"hello"+x)
                                myitem.addchild(myitem2)
                                for  y = 1 to 10
                                        myitem3 = new qtreewidgetitem()
                                        myitem3.settext(0,"hello"+x)
                                        myitem2.addchild(myitem3)
                                next
                        next
                        setheaderlabel("Steps Tree")
                }

                layout1.addwidget(tree1)
                setlayout(layout1)

                show()
        }

        exec()
}
Comment

PREVIOUS NEXT
Code Example
Python :: open urls using python grepper 
Python :: python list insert out of range 
Python :: Python loop aray 
Python :: Use miraculous with enviroment variable token 
Python :: Window freezes after clicking of button in python GTK3 
Python :: python alphabet to number 
Python :: Start of my python career 
Python :: numpy mask without losing shape 
Python :: fibonacci sphere python 
Python :: python launch ipython from script 
Python :: output of an intermediate layer 
Python :: how to split string into list conditionally+python 
Python :: heatmap choos format for annotation 
Python :: Print Wavelet modes 
Python :: dataflair python 
Python :: '.join(s) 
Python :: sklearn isolationforest 
Python :: pls work 
Python :: how to make a instagram report bot python 
Python :: python remainder divide by 60 
Python :: pass parameters to a odoo wizard 
Python :: "get_or_create" takes 1 positional argument but 2 were given 
Python :: changing correlation encoding values 
Python :: make setup file for cython 
Python :: pandas subtract two columns 
Python :: list data structure in python 
Python :: python os path join list 
Python :: how to get each word in a string in python 
Python :: python Detect Cycle in a Directed Graph 
Python :: Mirror Inverse Program in python 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =