How to create qrc file(qml) in Python Qt(PyQt)

1. create qml file 
 - main.qml 
 - test.qml


2. create resource.qrc file
resource.qml code

-----------------------------------

<RCC>

<qresource>

    <file>qml/main.qml</file>

    <file>qml/test.qml</file>

</qresource>

</RCC>
-----------------------------------


3. execute command in terminal (in workspace included qml files)
 $ pyside2-rcc -o resource.py resource.qrc


4. check resource.py file 
 : 
Completed when the resource.py file is created.

 

 

How to use qrc file!

1. in main.py 

ex ) qrc:///filename

QUrl("qrc:///qml/test.qml")

 

2. in main.qml file

ex ) qrc:/qml/test.qml

source: "qrc:/qml/test.qml"


#qrc #resource.qrc #resource.py #python #qt #pyqt #pyside2-rcc


How to remove a square box from a blog post. (with chrome)



ISSUE:
When you read a blog post with chrome, there's an issue where a square box.

Description:
There is an issue in which a square box appears in a blog post as follows.

This issue is only visible to Chrome users and is not a blog problem or a problem with the text itself.

This issue is due to the chrome extension plug-in currently running by the reader.
It is said that a square box can be seen if there is an extension related to the pop-up or a pop-up during the chrome extension plug-in.

In my case, the issue occurred due to "Google translation" plug-in.
Therefore, the issue is solved by shutting down the plug-in or using other Internet Explorers (explorer, edge, safari, etc.).

#blog #blogIssue #squarebox

Python error : pip installer ssl

solve :


pip install [item] --trusted-host pypi.org --trusted-host files.pythonhosted.org

ex)

$ pip install requests --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install psutil --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade paramiko --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade scp --trusted-host pypi.org --trusted-host files.pythonhosted.org


#python #pip #pip3 #error #--trusted-host #pypi.org #pythonhosted #ssl

How to check variant type in C++

 C++ example:

#include <typeinfo>
#include <iostream>
int main() {
int nInt;
char cChar;
std::cout<<"nInt type = " << typeid(nInt).name() <<std::endl;
std::cout<<"cChar type = " << typeid(cChar).name() <<std::endl;
return 0;
}
if you define #include <typeinfo>, you can know type info of the variant.

How to build multi binaries through cmake.

Topic :

1. How to build multi binaries through cmake.
2. How to make multi binaries by preprocess.


Linux Line Feed? Carriage Return? Remove ^M

linux "^M" issue

If you look the shell script or code sent from Windows to the Linux server, you may find "^M" at the end of the line.

ex 1 )
echo test^M


ex 2)

#include <iostream>^M
#include <string>^M


Solve :

all remove ^M

 $ vi source.cpp
 
:1,$s/^M//g

^M : ctrl+N and ctrl+M


dpkg command (install / remove)

 dpkg

 - install .deb

    $ dpkg -i *.deb


 - check intalled .deb package

    $dpkg --get-selections | grep <pkgName>


 - remove .deb 
   * If it is installed through a deb file, it should be removed in order according to dependencies.

    $ dpkg -P <pkgName>-dev

    $ dpkg -P <pkgName>-dbg

    $ dpkg -P  <pkgName>



#dpkg #deb #install #remove #package #linux #embedded

알뜰폰 삼성페이 교통카드 '한도 초과' 오류(등록 불가 오류) 해결방법

sk7mobile 알뜰폰 삼성페이 교통카드 등록 시, 한도 초과 문제 해결방법 skt usim 해킹 사건으로 인해 sk7mobile 알뜰폰을 사용하는 저도 usim을 바꾸고 나니 삼성페이 교통카드가 등록이 안되더라구요...  삼성페이 교통카드 기능 은...