Giter Club home page Giter Club logo

stackoverflow's Introduction

stack overflow

Stack Exchange reputation GitHub DonateBuyMeACoffe

profile for eyllanesc at Stack Overflow, Q&A for professional and enthusiast programmers

Questions

Inside the questions folder questions folder are the projects with an <id>, if you want to find the post you should use the link: https://stackoverflow.com/questions/<id>.

Issues

You should only report problems with the codes hosted in this repository, please:

  • Do not request applications or code. If you want me to implement any functionality then you can write to my email [email protected] where we can coordinate everything related to that work.
  • Do not claim for any action of mine in any of the forums that I participate (such as StackOverflow, forum.qt.io). For these types of claims I use the means provided by those sites.

License

Free software: MIT license

Donate

If this project help you reduce time to develop, you can give me a cup of โ˜• ๐Ÿ˜„

paypal

buymeacoffee

bitcoin

GitHub forks GitHub stars GitHub watchers GitHub followers

stackoverflow's People

Contributors

dependabot[bot] avatar eyllanesc avatar mustafaucr avatar sesu089 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stackoverflow's Issues

change MapPolyline path from PyQt5

Hi, I find your answer (48071952).
I test it, code works well in c++. I try to give the same result in Python3 (Pyqt5), but it's not working(

My code in PyQt5

w = QQuickWidget()
w.setSource(QUrl('main.qml'))
context = self.w.rootContext()
path = QtPositioning.QGeoPath()
path.addCoordinate(QtPositioning.QGeoCoordinate(55.754177, 37.619532))
path.addCoordinate(QtPositioning.QGeoCoordinate(55.754177, 37.629532))
path.addCoordinate(QtPositioning.QGeoCoordinate(55.754177, 37.649532))
context.setContextProperty("pathController",  path)

qml code

   Rectangle {
       visible: true
       width: 800
       height: 760
        property int marker_size: 16


    Map {
        objectName: "mapp"
        property real lat: 55.754177
        property real lon: 37.619532
        anchors.fill: parent
        plugin: Plugin {
            name: "osm"
        }
        center: QtPositioning.coordinate(lat, lon)
        zoomLevel: 14

        MapPolyline {
            id: pl
            line.width: 10
            line.color: 'red'
        }
    }

    function loadPath(){
        var lines = []
        for(var i=0; i < pathController.size(); i++){
            lines[i] = pathController.coordinateAt(i)
            console.log(lines[1]);
        }
        return lines;
    }
    Connections{
        target: pathController
        onGeopathChanged: pl.path = loadPath()
    }

    Component.onCompleted: pl.path = loadPath()
  }

I shall be very grateful for any assistance you can give.

Problem with table headers

hello, when i try to run a project with such multi-level headers, the application just freezes and nothing happens, I completely took your project. how can i fix this?

Bug in answer for saving/restoring widget properties using QSettings

@eyllanesc Firstly thank you for the amazing support you have provided to me and another on PyQt.

I am reporting an issues to one of your answers found on stackoverflow. Below are relevant links
https://stackoverflow.com/a/60028282/4988010
https://gist.github.com/eyllanesc/be8a476bb7038c7579c58609d7d0f031

Issue:
Using the save/restore functions you provided, I noticed a bug. Restoring settings from the ini file doesn't work properly. In an demo example I have created, the app contains multiple QDoubleSpinBox widgets. After restoring the settings, the resulting widgets have incorrect values. Often these incorrect values are duplicates of what another wQDoubleSpinBox widget contains. I can add screenshots of the issue if you're unable to reproduce. I tried troubleshoot the issue but still can't figure out why
https://gist.github.com/Zythyr/930ed8ac09a830717a459349e942a86a

I tried to troubleshoot the issue. When w.setProperty(name, val) is called, the val is correct as expected. But the actual written value is incorrect. I am unsure whats going on.

Question on Two List Selection 48327558

Dear Edwin,

Sorry for bothering you. I am a newbie of using Qt.

I tried to use your Two List Selection in stackoverflow/questions/48327558 but in my application I already have a UI file. I renamed the object names of my pushButtons to match your names: mButtonToSelected; mBtnMoveToAvailable; mBtnMoveToSelected; mButtonToAvailable. However, I do not know how to modify lines 27-65 in your header file, so that it will follow my UI file instead of following your layout.

Would you kindly teach me how to do so? Thank you very much indeed.

Best Regards,
David

Question about proper way remove data from data model in 51149966 post

Hello, Thanks for your posts on stackoverflow!
51149966 post helped me well with data model. But I have a little question about the way removing data from this model.
In the code as it goes I can append data with appendSample(Sample sample) function
and rendering in gui goes well. I customized this things for my needs, and first time when I append data to model with this function, all is good. But in my application data gathering may goes several times and in begin each attempt it need to delete data from model and append new after deleting.
But when I'm trying write something like
void removeSample(const int position){
beginInsertRows(QModelIndex(), rowCount(), rowCount());
/
code for removing data */
endInsertRows()
}
I've got exception in beginInsertRows(QModelIndex(), rowCount(), rowCount());
Data renew on view correctly if I set wrapper for QList<Sample *> mSamples; in samplemodel.h
for example like this
void clearSampleModel() { mSamples.clear(); }
but rendering goes not so very well in view and I get message in debugger that first item in model is undefined. I think it's happened because I remove model data without beginInsertRows(QModelIndex(), rowCount(), rowCount());
endInsertRows()
statements, but as I early said I get error when using it.
Can you explain me about correct way remove data from this model?
Thanks for your help!

mysqlplugins links expired

Following this stackoverflow issue, I tried to download the plugins here and here, but the links expired. Can you upload them again?

And in case of MacOS, what do I need to do besides copying the proper plugin to the QT_SQL_DRIVER_PATH?

Thanks in advance.

Automated script to update this repo?

Hi - I found your repo today and would like to maintain a similar repo for my own Stack Overflow contributions (https://stackoverflow.com/users/149428/taylor-d-edmiston).

Do you happen to have a script that is pulling this data from somewhere (e.g., Stack Exchange Data Explorer, a Stack Overflow data dump, Stack Exchange API, scraping, etc) to keep this repo up to date? For example, if someone community edits one of your answers.

Thank you!

Please help me to represent data from csv on map

Hi there!
eyllanesc, could you please help me to display markers (colored markers based on value) on map using a .csv file?
I have several csv files which contains data as follow: latitude, longitude, 200 channels (with signal levels).
I used a data mining framework and I like the results, but I need a QT app.
Thanks a lot!
Data File and Reprsentation on map
0
1
2

python code of this workaround of tab text limitation

Hey i checked this thread and i tried using this, but problem is i cant make text left aligned as its drawing from center of rectangle. Any way you can help me set it to left alignment? made thread about it here
i am getting this

image imgur link
when i use your code and i get this alignment

image imgur link

when i use this code

for index in range(self.count()):
    self.initStyleOption(option, index)
    tabRect = self.tabRect(index)
    tabRect.moveLeft(10)
    painter.drawControl(QtGui.QStyle.CE_TabBarTabShape, option)
    painter.drawText(tabRect, QtCore.Qt.AlignVCenter |\
                   QtCore.Qt.TextDontClip, \
                   self.tabText(index));

can you help please?

No entry for 46633698.

The solution posted for 46633698 is not in this repo, and it doesn't run out of the box due to missing imports. I have replied to the original question (I don't have enough rep to reply directly to the solution) with the working solution, replicated here:

import sys
from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.QtWidgets import (QLabel, QWidget)
from PyQt5.QtGui import QPainter, QPainterPath
from PyQt5.QtCore import pyqtSignal, QPoint, QSize
from PyQt5.QtWidgets import QApplication


class Drawer(QWidget):
    newPoint = pyqtSignal(QPoint)

    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.path = QPainterPath()

    def paintEvent(self, event):
        painter = QPainter(self)
        painter.drawPath(self.path)

    def mousePressEvent(self, event):
        self.path.moveTo(event.pos())
        self.update()

    def mouseMoveEvent(self, event):
        self.path.lineTo(event.pos())
        self.newPoint.emit(event.pos())
        self.update()

    def sizeHint(self):
        return QSize(400, 400)


class MyWidget(QWidget):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setLayout(QVBoxLayout())
        label = QLabel(self)
        drawer = Drawer(self)
        drawer.newPoint.connect(lambda p: label.setText('Coordinates: ( %d : %d )' % (p.x(), p.y())))
        self.layout().addWidget(label)
        self.layout().addWidget(drawer)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = MyWidget()
    w.show()
    sys.exit(app.exec_())

If this is not the correct approach, just let me know. I'm new to stackoverflow, so be kind :)

Thanks for your solution!

No Entry for 43529434

I came here from stackoverflow but could not find any entry for your answer with ID 43529434.
It will be very nice of you if you can still provide the full code.

add function inside table widget pyqt5

I have table widget with 5 items(name,sex,age,city and barcode number). Now I can extract all data from MYSQL expect barcode number ,because I want inside barcode number generate automatically, for example if sex=1 ,age =23 and city code = 456 than barcode number will be 123456. how can do that?

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.