PyQt5 a dash in checkbox not a ✓when I setCheckState(True)User input and command line argumentsdifferentiate null=True, blank=True in djangoChanging the “tick frequency” on x or y axis in matplotlib?How to draw border around QListWidgetItemWhy is “1000000000000000 in range(1000000000000001)” so fast in Python 3?QListWidget: connect function when QListWidgetItem changedAdding items from a text file to QlistWidget in pyQt5PyQt5: Check the existance of dynamically created Checkboxes and Refer themIs there a signal to use to change selected row in QListWidget when QLineEdit text field is clicked on?Getting QtWidgets from my custom QListWidgetItem

How should I respond when I lied about my education and the company finds out through background check?

Aragorn's "guise" in the Orthanc Stone

Strong empirical falsification of quantum mechanics based on vacuum energy density

Is it better practice to read straight from sheet music rather than memorize it?

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?

What are the purposes of autoencoders?

Why can Carol Danvers change her suit colours in the first place?

The screen of my macbook suddenly broken down how can I do to recover

Delivering sarcasm

Travelling outside the UK without a passport

Should I outline or discovery write my stories?

"Spoil" vs "Ruin"

What is this called? Old film camera viewer?

Longest common substring in linear time

Problem with TransformedDistribution

If infinitesimal transformations commute why dont the generators of the Lorentz group commute?

Fear of getting stuck on one programming language / technology that is not used in my country

Count the occurrence of each unique word in the file

Is it possible to have a strip of cold climate in the middle of a planet?

250 Floor Tower

A social experiment. What is the worst that can happen?

How do I color the graph in datavisualization?

Is it possible to put a rectangle as background in the author section?

Is it safe to use olive oil to clean the ear wax?



PyQt5 a dash in checkbox not a ✓when I setCheckState(True)


User input and command line argumentsdifferentiate null=True, blank=True in djangoChanging the “tick frequency” on x or y axis in matplotlib?How to draw border around QListWidgetItemWhy is “1000000000000000 in range(1000000000000001)” so fast in Python 3?QListWidget: connect function when QListWidgetItem changedAdding items from a text file to QlistWidget in pyQt5PyQt5: Check the existance of dynamically created Checkboxes and Refer themIs there a signal to use to change selected row in QListWidget when QLineEdit text field is clicked on?Getting QtWidgets from my custom QListWidgetItem













-1















enter image description here
As The pic shows, a dash line in checkbox not a tick. And I have to click to make it a tick, how can I fix it?



...
group_list = QListWidget(self)
for i in range(2):
group = QListWidgetItem(str(i))
group.setCheckState(1)
group_list.addItem(group)
...


ps: PyQt5.9.2










share|improve this question
























  • You can use the platform independent Fusion style by QApplication.setStyle("fusion")

    – Nejat
    Mar 7 at 7:49











  • How does your code even execute? QListWidgetItem has no member function setCheckState

    – replete
    Mar 7 at 7:50











  • @replete Yes it does.

    – ekhumoro
    Mar 7 at 11:18















-1















enter image description here
As The pic shows, a dash line in checkbox not a tick. And I have to click to make it a tick, how can I fix it?



...
group_list = QListWidget(self)
for i in range(2):
group = QListWidgetItem(str(i))
group.setCheckState(1)
group_list.addItem(group)
...


ps: PyQt5.9.2










share|improve this question
























  • You can use the platform independent Fusion style by QApplication.setStyle("fusion")

    – Nejat
    Mar 7 at 7:49











  • How does your code even execute? QListWidgetItem has no member function setCheckState

    – replete
    Mar 7 at 7:50











  • @replete Yes it does.

    – ekhumoro
    Mar 7 at 11:18













-1












-1








-1








enter image description here
As The pic shows, a dash line in checkbox not a tick. And I have to click to make it a tick, how can I fix it?



...
group_list = QListWidget(self)
for i in range(2):
group = QListWidgetItem(str(i))
group.setCheckState(1)
group_list.addItem(group)
...


ps: PyQt5.9.2










share|improve this question
















enter image description here
As The pic shows, a dash line in checkbox not a tick. And I have to click to make it a tick, how can I fix it?



...
group_list = QListWidget(self)
for i in range(2):
group = QListWidgetItem(str(i))
group.setCheckState(1)
group_list.addItem(group)
...


ps: PyQt5.9.2







python pyqt pyqt5






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 7:47









eyllanesc

84.1k103562




84.1k103562










asked Mar 7 at 7:40









Chweng MegaChweng Mega

617513




617513












  • You can use the platform independent Fusion style by QApplication.setStyle("fusion")

    – Nejat
    Mar 7 at 7:49











  • How does your code even execute? QListWidgetItem has no member function setCheckState

    – replete
    Mar 7 at 7:50











  • @replete Yes it does.

    – ekhumoro
    Mar 7 at 11:18

















  • You can use the platform independent Fusion style by QApplication.setStyle("fusion")

    – Nejat
    Mar 7 at 7:49











  • How does your code even execute? QListWidgetItem has no member function setCheckState

    – replete
    Mar 7 at 7:50











  • @replete Yes it does.

    – ekhumoro
    Mar 7 at 11:18
















You can use the platform independent Fusion style by QApplication.setStyle("fusion")

– Nejat
Mar 7 at 7:49





You can use the platform independent Fusion style by QApplication.setStyle("fusion")

– Nejat
Mar 7 at 7:49













How does your code even execute? QListWidgetItem has no member function setCheckState

– replete
Mar 7 at 7:50





How does your code even execute? QListWidgetItem has no member function setCheckState

– replete
Mar 7 at 7:50













@replete Yes it does.

– ekhumoro
Mar 7 at 11:18





@replete Yes it does.

– ekhumoro
Mar 7 at 11:18












1 Answer
1






active

oldest

votes


















0














I find it out, Just setCheckState explicity



from PyQt5.QtCore import Qt
...
group.setCheckState(Qt.Checked)
....





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038445%2fpyqt5-a-dash-in-checkbox-not-a-when-i-setcheckstatetrue%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I find it out, Just setCheckState explicity



    from PyQt5.QtCore import Qt
    ...
    group.setCheckState(Qt.Checked)
    ....





    share|improve this answer





























      0














      I find it out, Just setCheckState explicity



      from PyQt5.QtCore import Qt
      ...
      group.setCheckState(Qt.Checked)
      ....





      share|improve this answer



























        0












        0








        0







        I find it out, Just setCheckState explicity



        from PyQt5.QtCore import Qt
        ...
        group.setCheckState(Qt.Checked)
        ....





        share|improve this answer















        I find it out, Just setCheckState explicity



        from PyQt5.QtCore import Qt
        ...
        group.setCheckState(Qt.Checked)
        ....






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 7 at 7:55









        eyllanesc

        84.1k103562




        84.1k103562










        answered Mar 7 at 7:52









        Chweng MegaChweng Mega

        617513




        617513





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038445%2fpyqt5-a-dash-in-checkbox-not-a-when-i-setcheckstatetrue%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved